imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 2, 2014 #1 Hello, Using net library is a perfect way to sending email. But how can I send them, on the background, setting a different account from the field "sender"? Right now it works only with the device account or not?
Hello, Using net library is a perfect way to sending email. But how can I send them, on the background, setting a different account from the field "sender"? Right now it works only with the device account or not?
Erel B4X founder Staff member Licensed User Longtime User Oct 3, 2014 #2 You can use whichever account you like. SMTP object has nothing to do with the user account. Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 3, 2014 #3 I don't understand. The initialize method of smtp call: Initialize (Server AsString, Port AsInt, Username AsString, Password AsString, EventName AsString) Upvote 0
I don't understand. The initialize method of smtp call: Initialize (Server AsString, Port AsInt, Username AsString, Password AsString, EventName AsString)
Erel B4X founder Staff member Licensed User Longtime User Oct 5, 2014 #4 I misunderstood your previous post. Change the sender field with SMTP.Sender property (after it is initialized). Upvote 0
I misunderstood your previous post. Change the sender field with SMTP.Sender property (after it is initialized).
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 6, 2014 #5 Sorry but I still do not understand. If I use this code (assuming that "[email protected]" is my gmail account and the same that I use the phone): Code: Dim mailSMTP As SMTP mail.Initialize("smtp.gmail.com", 587, "[email protected]", "PWDAAA", "SMTP") mail.StartTLSMode = True mail.To.Add("[email protected]") mail.Subject = "This is the subject" mail.Body = "This is the message body." mail.Send I receive a mail from myself. But if I set another account gmail when I initialize the variable "mail", the app doesn't send the mail. Upvote 0
Sorry but I still do not understand. If I use this code (assuming that "[email protected]" is my gmail account and the same that I use the phone): Code: Dim mailSMTP As SMTP mail.Initialize("smtp.gmail.com", 587, "[email protected]", "PWDAAA", "SMTP") mail.StartTLSMode = True mail.To.Add("[email protected]") mail.Subject = "This is the subject" mail.Body = "This is the message body." mail.Send I receive a mail from myself. But if I set another account gmail when I initialize the variable "mail", the app doesn't send the mail.
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2014 #6 Try: Code: mail.Initialize("smtp.gmail.com", 587, "[email protected]", "PWDAAA", "SMTP") mail.StartTLSMode = True mail.To.Add("[email protected]") mail.Subject = "This is the subject" mail.Body = "This is the message body." mail.Sender = "[email protected]" '<-------------------------------------------- mail.Send BTW, I'm not sure that gmail will allow you to send emails with a different sender. Upvote 0
Try: Code: mail.Initialize("smtp.gmail.com", 587, "[email protected]", "PWDAAA", "SMTP") mail.StartTLSMode = True mail.To.Add("[email protected]") mail.Subject = "This is the subject" mail.Body = "This is the message body." mail.Sender = "[email protected]" '<-------------------------------------------- mail.Send BTW, I'm not sure that gmail will allow you to send emails with a different sender.
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 7, 2014 #7 But I don't want to set my private password when initializing the variable. I prefer to set the "[email protected]" pwd Upvote 0
But I don't want to set my private password when initializing the variable. I prefer to set the "[email protected]" pwd
DonManfred Expert Licensed User Longtime User Oct 7, 2014 #8 imgsimonebiliato said: But I don't want to set my private password when initializing the variable. I prefer to set the "[email protected]" pwd Click to expand... Then you should ask the user for email and pw which your app then can use in mail.Initialize Upvote 0
imgsimonebiliato said: But I don't want to set my private password when initializing the variable. I prefer to set the "[email protected]" pwd Click to expand... Then you should ask the user for email and pw which your app then can use in mail.Initialize
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 7, 2014 #9 Is there any library that already do this? Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 8, 2014 #11 Erel said: Do what? Click to expand... A library that automatically set "user for email and pw" Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2014 #12 There is no such library. Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 10, 2014 #13 Ok thanks. I will do my best Upvote 0
Y yuval Member Licensed User Longtime User Jan 2, 2015 #14 hi you can open a gmail account just for sending this kind of mail. ( so the password issue will not be a big thing ) and then change the settings of the gmail account of " access for less secure apps" to enabled. and then the net library smtp function works great. Upvote 0
hi you can open a gmail account just for sending this kind of mail. ( so the password issue will not be a big thing ) and then change the settings of the gmail account of " access for less secure apps" to enabled. and then the net library smtp function works great.
JakeBullet70 Well-Known Member Licensed User Longtime User Jan 3, 2015 #15 Gmail can and will fail if you are sending from a different city, location. So if you live in lets say Seattle, Wa. USA and someone in using your app in Europe. It will fail. Upvote 0
Gmail can and will fail if you are sending from a different city, location. So if you live in lets say Seattle, Wa. USA and someone in using your app in Europe. It will fail.
Y yuval Member Licensed User Longtime User Jan 3, 2015 #16 thanks Jake, you are probably right. do you know of any email providers that don't check where you are ? Upvote 0
thanks Jake, you are probably right. do you know of any email providers that don't check where you are ?
JakeBullet70 Well-Known Member Licensed User Longtime User Jan 3, 2015 #17 Never did find one. I ended up buying some web hosting and used that. Upvote 0