How to send to gmail account ?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Primoz128
Enthusiast
Enthusiast
Posts: 212
Joined: Sat Sep 10, 2011 8:25 pm
Location: Slovenia

How to send to gmail account ?

Post by Primoz128 »

Well i tried using the example, but i don't know...

Code: Select all

InitNetwork()

  ; Note: change the address and smtp to have a working example
  ;
  If CreateMail(0, "primoz.fs@gmail.com", "Hello")
    AddMailRecipient(0, "primoz.fs@gmail.com", #PB_Mail_To)
    SetMailBody(0, "This is a body !" + #CRLF$ + "Second line")

    Debug SendMail(0, "smtp.gmail.com")
  EndIf
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: How to send to gmail account ?

Post by IdeasVacuum »

I would imagine the server requires User Name and Password in SendMail()
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
spikey
Enthusiast
Enthusiast
Posts: 771
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: How to send to gmail account ?

Post by spikey »

You can't use PB's library because GMail requires SSL which PB doesn't support. However have a look at...
http://www.purebasic.fr/english/viewtop ... =5&t=52462
http://www.purebasic.fr/english/viewtop ... =5&t=52463
Post Reply