Sending an email in PB

Just starting out? Need help? Post your questions and find answers here.
User avatar
matalog
Enthusiast
Enthusiast
Posts: 305
Joined: Tue Sep 05, 2017 10:07 am

Sending an email in PB

Post by matalog »

Should this work to send an email in PB?

Code: Select all

emailaddress$="email@gmail.com"
password$="secretpassword1"
toaddress$="email@hotmail.com"

CreateMail(1,emailaddress$,"Greetings")
SetMailBody(1,"Test Email")
 AddMailRecipient(1, toaddress$, #PB_Mail_To)

 Debug SendMail(1,"smtp.gmail.com",587,#PB_Mail_Debug,emailaddress$,password$)
 
  Repeat
    Debug MailProgress(1)
    Delay(300)
   Until Progress = #PB_Mail_Finished Or Progress = #PB_Mail_Error
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Sending an email in PB

Post by mk-soft »

You must allow third party e-mail programmes online access to your e-mail account.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Sending an email in PB

Post by DarkDragon »

bye,
Daniel
Post Reply