Page 1 of 1

How to send to gmail account ?

Posted: Wed Jun 05, 2013 11:51 am
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

Re: How to send to gmail account ?

Posted: Wed Jun 05, 2013 12:15 pm
by IdeasVacuum
I would imagine the server requires User Name and Password in SendMail()

Re: How to send to gmail account ?

Posted: Wed Jun 05, 2013 12:33 pm
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