How to send an email as html?

Just starting out? Need help? Post your questions and find answers here.
infratec
Always Here
Always Here
Posts: 7625
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to send an email as html?

Post 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.
Last edited by infratec on Sun Nov 13, 2022 4:13 pm, edited 1 time in total.
Johanson
User
User
Posts: 40
Joined: Sat Aug 01, 2020 9:53 am

Re: How to send an email as html?

Post 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"
infratec
Always Here
Always Here
Posts: 7625
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to send an email as html?

Post 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 ...
Last edited by infratec on Thu Mar 11, 2021 11:13 am, edited 1 time in total.
dige
Addict
Addict
Posts: 1413
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: How to send an email as html?

Post by dige »

Johanson wrote:
I tried
I remind you: I have version 5.73
It works with PB 5.73! Look at page 4..
"Daddy, I'll run faster, then it is not so far..."
Johanson
User
User
Posts: 40
Joined: Sat Aug 01, 2020 9:53 am

Re: How to send an email as html?

Post 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?
Johanson
User
User
Posts: 40
Joined: Sat Aug 01, 2020 9:53 am

Re: How to send an email as html?

Post 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]) 
infratec
Always Here
Always Here
Posts: 7625
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to send an email as html?

Post 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"
Johanson
User
User
Posts: 40
Joined: Sat Aug 01, 2020 9:53 am

Re: How to send an email as html?

Post 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.
Post Reply