I am developing a ticket system, where customer can ask their queries or questions about services, When customer send mail to SUPPORT email id, then an automatic mail will be sent to customer with an unique #TicketId,
For this scenario, I am using Gmail API with PubSub PUSH type notification, When I got notification by PubSub that a new mail is arrived, then from PHP by Gmail API I will send mail to customer with #TicketId,
Everything is working fine, but there are timing issue when I check mails on Gmail, it is showing time of sent mail earlier than receive mail, same I got in my db also,
I am using internalDate key of mail(message) for save datetime in Database,
Am I doing something wrong? Please help me or suggest the correct way,
Thanks
Related
I have configured outlook email with oauth2 in my application and storing all emails in database but every time i have to fetch all the emails and then check in database and if find new then store in database.
Looking for a solution like if new email arrive in my inbox it ping my server and i store that email only.
Found API hook here: https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/notify-rest-operations. The Outlook Push Notifications REST API sends notifications via a webhook to a client-side web service to notify apps about changes to a user's mailbox data.
I want to receive my mail (INBOX GMAIL) in my laravel application (5.x).
But I don't know how to do this.
I think I need to use a listener : when a mail arrives in my INBOX, I want a laravel event to read the email and save automatically the fields in my database (Subject, Message, Attachments...).
Then the mail in my INBOX will be in status "read".
Can you help me ?
Thank you :)
Interesting way to look at this but why not just have it send messages to the ticketing system and completely manage it there?
You would need to take a look at https://developers.google.com/gmail/api/v1/reference/
Basically you would just be managing emails in a different application. There are also rate limits to be aware of depending on the scope of this system.
It would be safer in that event to have gmail forward the emails to the ticketing system and 100% manage it there and use SMTP to just reply from the system.
I'm building a service for a company. The users of the service will send survey links to a list of email addresses. I'm going to use Mandrill as an email engine for this. The service is built using Laravel.
The users will feed a list of email addresses to the service that will generate emails (unique for every email address) and send them through the Mandrill API.
BUT, of course there will be errors made by the users. They will feed some bad email addresses in and emails will bounce. I need to find of way of notifying the users of the service that some emails have bounced.
Is there a way to get Mandrill to send a list of bounced emails to the sender or reply address?
Me as a developer has the Mandrill account of course, but I'm not interested in the bounce information - that has to go to the users of the system. So they can take action and correct the errors.
Thank you.
I see from Mandrill API that it is possible to get the status of sent e-mails with call /exports/activity.json as described in https://mandrillapp.com/api/docs/exports.JSON.html#method-activity
If you get any bounced e-mails from there then you can manually send the corresponding messages to the users who you want to.
We are developing a email web site.but we are facing problem in receiving and validating the mail.i have the following doubts.can you please help me in clarifying these???
one more important thing is we are not using squrrelmail, qmail etc.
how do we receive emails for users in email web site?
do we save all the received emails in admin's mail box or in database as per the username
(my idea on email web site is,all the incoming mail are stored in admin's mail box and after the email mail is stored in database,and then the mail deleted in admin's mail box.Is it correct.if not how to store the emails in database directly in web site)
what is the technique behind the receiving mail???i think there are various techniques like email piping etc.
is there any special process of creating users for email web site,i mean do we need to create mailbox(i think mail account) for each user at the time of registration.if we need to create mail box for user,can we create it with imap_createmailbox() function.
are the users gmail,yahoomail etc are accessig database or their mail accounts at the time their login??
can we do all these things with imap functions in php??
There are many different solutions to this problem, polling existing servers, adding scripts to run when a message is received or using a gateway like CloudMailin. I wrote a blog post relating to this (it's for rails but almost all applies to php too).
The other problems almost all span from how you setup the first thing. In many cases you could just log the emails directly to your database and retrive them based on the recipient address. I think you need to explain exactly what you want to do with the email? Are you just providing email hosting for your users or are you providing an additional service? If you're just providing hosting then there are simpler approaches available.
i want to have a script that will save gmail emails from an account in mysql db using php. Mails(both freshly new and reply ones) will be marked to be in the same category if they have the same subject. That is just the same way in gmail or yahoo mail.
So far as I know gmail IMAP does not give the facility to track which are the reply mails.
Which API or whatever should I use??
The script will keep running.
Do I need to use scheduled task for that?
I haven't worked with that, but as i Google around, it turns out GMAIL provides IMAP Extensions API. And there you have an option to Access to the Gmail thread ID: X-GM-THRID
The reply emails as you call them are stored in the sent-mail folder, so just download them with IMAP.
You can track how emails go together using the In-Reply-To: and References: headers. Using the subject is not reliable.
#sof_user : every mail will have message_id in the header. google tracing the email with the id, if it is reply, then IN-REPLAY-TO will have the same id.