Good evening,
I'm trying to send an email through my app in the background.
I've found this: viewtopic.php?f=7&t=4835&p=77979&hilit=stmp#p77979 but the links are all dead.
			
			
									
									
						STMP
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: STMP
Sarah Reichelt's blog explains it here:
https://troz.net/post/2015/livecode-stacks/ and includes a link to archived LiveCode stacks on github.
			
			
									
									
						https://troz.net/post/2015/livecode-stacks/ and includes a link to archived LiveCode stacks on github.
- 
				Quinton B.
- Posts: 108
- Joined: Mon Mar 20, 2017 5:13 am
Re: STMP
Lol, I'm still having trouble with this, Sarah's doesn;t work either.
			
			
									
									
						- 
				Quinton B.
- Posts: 108
- Joined: Mon Mar 20, 2017 5:13 am
Re: STMP
Yes, however it doesn't work.
xx are for codes that will not be in here.
			
			
									
									
						xx are for codes that will not be in here.
Code: Select all
on sendVerificationCode
   local tUrl, tEmailMessage, tSender, tRecipient, tSettings, tResult, tBytes, tResponseHeaders
   
   put "smtp://mail.portableairman.com:xxx/" into tUrl
   put  "Your Portable Airman Authentication Code is:" & tRandomAlphaNumericalGenerator  into tEmailMessage
   
   put "do_not_reply@portableairman.com" into tSettings["username"]
   put "xxxxxxxxxxxxxxxx" into tSettings["password"]
   put "do_not_reply@portableairman.com" into tSender
   put tDoDEmailCheck into tRecipient
 
   
   -- Enable TLS for SMTP
   put true into tSettings["use_ssl"]
   
   put tsNetSmtpSync(tURL, tSender, tRecipient, tEmailMessage, tResponseHeaders, tBytes, tSettings) into tResult  
   
   if the first word of tResult is "tsneterr:" then
      answer "Error" && tResult && "returned from server"
   else
      answer "E-mail sent"
   end if
   go to card "Verification"
end sendVerificationCode