aaronk Well-Known Member Licensed User Longtime User Apr 18, 2019 #1 Hi, I am sending a email using SMTP but trying to work out how to add a reply-to (or make it show it sent from someone else) Currently it's sending fine by using: Code: SMTP.Initialize(smtpServer, smtpPort, "[email protected]", "xxxxxx", "smtp") SMTP.UseSSL = True SMTP.Sender = "myname<[email protected]>" SMTP.To.Add("[email protected]") However, it shows [email protected] as the email address it was sent from. (of cause this is not my real email, using the above values as examples while posting it on the forum) I was hoping it would send the email as myname<[email protected]> I am using Gmail as the email server. I am guessing the from email can't be changed when using the Gmail server, and it needs to be sent from the same email address the user signed into the gmail server with? Is there a way in adding a reply-to email address so if the user clicks reply it will send it to a different email than what it was sent from ?
Hi, I am sending a email using SMTP but trying to work out how to add a reply-to (or make it show it sent from someone else) Currently it's sending fine by using: Code: SMTP.Initialize(smtpServer, smtpPort, "[email protected]", "xxxxxx", "smtp") SMTP.UseSSL = True SMTP.Sender = "myname<[email protected]>" SMTP.To.Add("[email protected]") However, it shows [email protected] as the email address it was sent from. (of cause this is not my real email, using the above values as examples while posting it on the forum) I was hoping it would send the email as myname<[email protected]> I am using Gmail as the email server. I am guessing the from email can't be changed when using the Gmail server, and it needs to be sent from the same email address the user signed into the gmail server with? Is there a way in adding a reply-to email address so if the user clicks reply it will send it to a different email than what it was sent from ?
DonManfred Expert Licensed User Longtime User Apr 18, 2019 #2 Search for a method to add additional header. Im not at any pc to find the method. Add a reply-to header. Upvote 0
Search for a method to add additional header. Im not at any pc to find the method. Add a reply-to header.
DonManfred Expert Licensed User Longtime User Apr 18, 2019 #3 Look here https://www.b4x.com/android/help/net.html#smtp_additionalheaders But honestly i dont lnow if that works on b4j too Upvote 0
Look here https://www.b4x.com/android/help/net.html#smtp_additionalheaders But honestly i dont lnow if that works on b4j too
aaronk Well-Known Member Licensed User Longtime User Apr 19, 2019 #4 Adding the additional header for reply-to seem to work. After looking into more detail, it seems that Google (Gmail) doesn't allow the sender email to be different than what has been used to login to the server with. But Reply-to seems to be allowed. Code: Dim map1 As Map map1.Initialize map1.Put("reply-to","MyName<[email protected]>") SMTP.AdditionalHeaders = map1 Upvote 0
Adding the additional header for reply-to seem to work. After looking into more detail, it seems that Google (Gmail) doesn't allow the sender email to be different than what has been used to login to the server with. But Reply-to seems to be allowed. Code: Dim map1 As Map map1.Initialize map1.Put("reply-to","MyName<[email protected]>") SMTP.AdditionalHeaders = map1
Erel B4X founder Staff member Licensed User Longtime User Apr 19, 2019 #5 Code: SMTP.AdditionalHeaders = CreateMap("reply-to": "MyName<[email protected]>") Upvote 0