Page 2 of 2

Re: How to send an email as html?

Posted: Wed Mar 10, 2021 6:48 pm
by infratec
Sorry, was the wrong link.
In this file I did not update libcurl.pbi

This is the right link:
viewtopic.php?p=591235

But I also added the new file in the other zip file.

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 1:04 am
by Johanson
infratec wrote:Sorry, was the wrong link.
In this file I did not update libcurl.pbi

This is the right link:
https://www.von-der-salierburg.de/downl ... ibcurl.zip

But I also added the new file in the other zip file.
I downloaded the new version; looks nice; it doesn't show any errors, but .. it keeps saying "failed: Timeout was reached"

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 7:56 am
by infratec
Then your configuration of the smtp server is wrong or it is not allowed.

Check the allowed ports, check if it is smtps or smtp ...

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 9:53 am
by dige
Johanson wrote:
I tried
I remind you: I have version 5.73
It works with PB 5.73! Look at page 4..

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 7:27 pm
by Johanson
infratec wrote:Then your configuration of the smtp server is wrong or it is not allowed.

Check the allowed ports, check if it is smtps or smtp ...
Configuration is OK (everything works in the example below, also in Thunderbird it's ok)

Code: Select all

InitNetwork()

If CreateMail(0, "sender@xxxxxx.xx", "Subject - Hello !")
  SetMailBody(0, "Hello !" + #CRLF$ + "This is a multi-" + #CRLF$ + "line mail !")
  AddMailRecipient(0, "mailto@xxxxxxxxxx.xx", #PB_Mail_To)
  Result = SendMail(0, "smtp.xxx.xx", 587, #PB_Mail_Asynchronous, "sender@xxxxxx.xx", "SerwiS#000")
  Repeat
    Progress = MailProgress(0)
    Delay(300)
  Until Progress = #PB_Mail_Finished Or Progress = #PB_Mail_Error
  
  If Progress = #PB_Mail_Finished
    MessageRequester("Information", "Mail correctly sent !")
  Else
    MessageRequester("Error", "Can't sent the mail !")
  EndIf
  
EndIf
Can I set the port in Curl?

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 7:54 pm
by Johanson
dige wrote:
Johanson wrote:
I tried
I remind you: I have version 5.73
It works with PB 5.73! Look at page 4..
Do You mean code posted: Wed Aug 29, 2018 3:49 am (normeus)?

Code: Select all

  Base64EncoderBuffer(*B64EncodeBufferA,
                      MemorySize(*B64EncodeBufferA)-1,
                      *B64EncodeBufferB,
                      MemorySize(*B64EncodeBufferB)-1)
Syntax in PB v.5.73:

Code: Select all

Result$ = Base64Encoder(*InputBuffer, InputSize [, Flags]) 

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 9:41 pm
by infratec
Does your constants look like this?

Code: Select all

#MailServer = "smtps://smtp.xxx.xx:587"

#SMTP_User = "sender@xxxxxx.xx"
#SMTP_Password = "SerwiS#000"

Re: How to send an email as html?

Posted: Thu Mar 11, 2021 9:54 pm
by Johanson
infratec wrote:Does your constants look like this?

Code: Select all

#MailServer = "smtps://smtp.xxx.xx:587"

#SMTP_User = "sender@xxxxxx.xx"
#SMTP_Password = "SerwiS#000"
YES!!! YES!!! YES!!!
it works! God exists.

thanks a lot
it finally worked

Code: Select all

#MailServer = "smtp.xxx.xx:587"
Again thank you very much.