How to use html in body of PB mail?

Just starting out? Need help? Post your questions and find answers here.
T4r4ntul4
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Mar 04, 2014 4:15 pm
Location: Netherlands

How to use html in body of PB mail?

Post by T4r4ntul4 »

Hi all,

I noticed you cant use html in body of the PureBasic mail. Are there any working solutions to this problem, working with version PB 5.50?

Any help is appreciated!
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to use html in body of PB mail?

Post by infratec »

Hi,

the problem is the Content-Type which is used by PB:
Content-type: text/plain; charset=ISO-8859-1; format=flowed
For html it should be:
Content-type: text/html; charset=iso-8859-1
At the moment you have no chance to modify this.

Code: Select all

SetMailAttribute(0, #PB_Mail_Custom, "Content-type: text/html; charset=iso-8859-1")
Does not replace the original part. It adds a second one which is ignored (by Thunderbird)
So a new attribute is required:

Code: Select all

#PB_Mail_ContentType
Place a feature reuest, since Fred had already done some stuff for PB 5.60.

Bernd
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: How to use html in body of PB mail?

Post by DoubleDutch »

+1

Not being able to send html mail is a pain.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: How to use html in body of PB mail?

Post by Dude »

+1, although I swear I used to be able to do this. Weird.
Post Reply