Android Question how can I include mail user in smtp function

jose luis gudino

Active Member
Licensed User
Longtime User
thanks for the support
the problem really is this:
I am using a sendgrid account to send mails this is the configuration that the provider sends me:

#smtp.host=smtp.sendgrid.net
#smtp.port=587
#smtp.user=LaserTrack
#smtp.user.emailAddress= alerts@lasertrackgps.net
#smtp.password=B13nf@c1l1t0
#smtp.enableSSL=false (TLS)

user is # smtp.user = LaserTrack
when I create the smtp function it is as follows:

B4X:
SMTP.Initialize("smtp.sendgrid.net", 587, "LaserTrack", "xxxxxx", "SMTP")
SMTP.UseSSL = True


I need to put smtp.user.email Address = alerts@lasertrackgps.net, so that the mail is not returned by spam






 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
B4X:
SMTP.Initialize("smtp.sendgrid.net", 587, "alerts@lasertrackgps.net", "xxxxxx", "SMTP")
SMTP.UseSSL = True

Usually in an email server, the Usermail is used as the UserName...
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I dont think there's another way, except trying to use reflexion.. but that is beyond my scope!
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
There's one more setting:
B4X:
SMTP.Initialize("smtp.sendgrid.net", 587, "alerts@lasertrackgps.net", "xxxxxx", "SMTP")
SMTP.Sender = "LaserTrack<alerts@lasertrackgps.net>" '<---- This setting.
SMTP.UseSSL = True
 
Last edited:
Upvote 0

udg

Expert
Licensed User
Longtime User
And remove password from post#3 if it's your real password!
 
Upvote 0

jose luis gudino

Active Member
Licensed User
Longtime User
(solved) thanks to all for the support,
B4X:
smtp.Initialize("smtp.sendgrid.net", 587, "LaserTrack", "xxxxx", "SMTP")
    smtp.Sender = "alertas@lasertrackgps.net" '<---- This setting.
    smtp.UseSSL = False
 
Upvote 0
Top