html body in e-mails

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

html body in e-mails

Post by infratec »

Hi,

it would be possible if we can replace the Content-type of the packet.
For that a new mail attribute would be nice:

#PB_Mail_ContentType

then we are able to replace the original one with:

Code: Select all

SetMailAttribute(0, #PB_Mail_ContentType, "Content-type: text/html; charset=iso-8859-1")
See also here:
viewtopic.php?f=13&t=67605

Bernd
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: html body in e-mails

Post by Dude »

It's been requested before:

viewtopic.php?f=3&t=65351

And a POP3 lib to go with it would be great. :)
normeus
Enthusiast
Enthusiast
Posts: 415
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: html body in e-mails

Post by normeus »

+1

However; I don't think it is as easy as just adding setMailAttribute, "Content-type: text/html; charset=iso-8859-1" or Fred would've done it.

On Sep of 2018 I was creating a PHP email program and I realized that PB's way of adding attachments had to be modified in order for it to be able to send HTML. I completely forgot exactly what the problem was but, if you have time to investigate see this hack: viewtopic.php?p=527558#p527558.


Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: html body in e-mails

Post by infratec »

If you can replace the content-type, you can do what you want.
Ok, you have to know how to do. But that's not the problem :wink:

If you can not replace the content-type ... you can do nothing.
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: html body in e-mails

Post by DoubleDutch »

This is a much needed feature.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
BarryG
Addict
Addict
Posts: 3322
Joined: Thu Apr 18, 2019 8:17 am

Re: html body in e-mails

Post by BarryG »

+1
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: html body in e-mails

Post by DoubleDutch »

It's a shame that this still isn't possible, it would make all the difference to the mail library.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
BarryG
Addict
Addict
Posts: 3322
Joined: Thu Apr 18, 2019 8:17 am

Re: html body in e-mails

Post by BarryG »

DoubleDutch wrote:It's a shame that this still isn't possible, it would make all the difference to the mail library.
We need a native POP3 library as well, so PureBasic can be used to make a full email client.
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: html body in e-mails

Post by DoubleDutch »

+1
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply