I have implemented simple email sending client as show in http://www.baeldung.com/spring-email. I used Gmail smtp server, everything works fine but google sets "from" field to email of which I have connected to smtp server. This is a problem because I want that "from" field would be an email address which client entered. Does anyone know how to solve it??
P.S. I have found this https://support.google.com/mail/answer/22370?hl=en but it is not an option.
Gmail is not going to let you send messages that appear to come from any arbitrary email address because that would allow you to spam or phish people with a forged From address.
Related
I use go-mail library to send emails with smtp. But I faced common issue that sent emails won't appear in sent folder. Googling I found that the only way to solve it is to upload sent email though imap.
The question is how do I obtain copy of sent email with smtp email?
The question is how do I obtain copy of sent email with smtp email?
You can't. SMTP is just for delivering mail. There is no concept of users mailboxes and specifically the Sent folder within SMTP.
We've implemented the following approach and it works for us:
Send email with smtp and bcc to own email.
Move/upload email with imap to sent folder.
For polling new messages use UID which is auto increment, so just remember the last processed and download all that is more than that.
How to use different sender address in sending emails in Laravel. What i want is to send some emails from one email id and some mails from second email id but gmail is picking up every time the configuration done in env not from mailable class.
You can't replace sender with Google SMTP service.
Google rewrites the From and Reply-To headers in messages you send via it's SMTP service to values which relate to your gmail account.
GMail does allow sending via different addresses or alias but this is for sending via the GMail web app, see Here
If you own the domain you are supposedly sending from, use the Gmail for Domains , and setup a "myapp#mydomain.com" account.
Or, use another SMTP provider
I'm setting up my Laravel website, and now comes the part where I configure Mailgun to send and receive emails.
I followed different guides to do that, yet I don't feel I'm doing it right. I'm now stuck with this error:
Failed: postmaster#syrianafood.dk → ibrahim_hasan_eng#hotmail.com 'New Order from Ibrahim Hasan' Not delivering to previously bounced address
i.e. Mailgun is not able to deliver my emails. Could you please guide me through this? Thank you!
If mail was sent and rejected by the provider (bad content, headers, etc), Mailgun will automatically blacklist that address from being sent to in the future.
This is to prevent blacklisting yourself from many of the different MX providers out there.
If you think you've solved that problem, you can perform a DELETE request through the Mailgun API in the format of DELETE /<domain>/bounces/<address> before sending the mail, and then you'll be able to send to that address again.
You can check if a bounce has happened previously by performing a POST request to POST /<domain>/bounces. Furthermore, you will receive a JSON object back with a REASON as to why the bounce occurred, giving you the ability to respond in kind to this.
If a domain is not working correctly and it's not in the blacklist, then it's possible that the MX Provider its self is not accepting the emails and is responding unfavorably in a way that Mailgun cannot handle.
You can also delete the mail directly from the Mailgun UI if you have the login credentials. Please see the comment below and give it an upvote.
I want to send an e-mail using gmail API.
I want to know if the email was received successfully. And if not, what the problem. (Such as SMTP Log)
I can use Google Admin G-Suite if need.
How can I do it?
Thank you.
What you are looking for is Request read receipt after an email is sent. This would notify the sender when the recipient reads the email.
This is not something that is currently available in the gmail api. you may want to consider submitting a feature request here
Here is the scenario. I am using PHP and I want to check whether an email address is valid and deliverable. Here are the steps I take:
Validate email address via regex
Validate email address via php filter_var
Finally use SMTP to check whether the recipient exists
This thing works perfectly except that using an SMTP way is too slow and takes anywhere between 10 seconds to 40 seconds to validate. Sometimes the SMTP check is blocked by the recipient server and my server ip was blacklisted which made all the emails to that server as invalid.
There are professional services out there which do this for you but I don't want to use them for this particular project I am doing. Due to restrictions I cannot actually send an email to that email address.
Is there anyother way or faster way to validate the email addresses? How do these professional email validating companies do the validations so fast and cheaply?
I apologise if the question is not right for this forum. Please tell me and I will promptly delete this. I am new to stackoverflow.
P.S: I checked the other questions but they all pointed to using SMTP as the solution which I am already doing.