| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: May 2005 Location: England
Posts: 390
![]() ![]() ![]() | Mail In Both Plain Text And HTML At The Same Time! Hey, I was looking around for ages trying to get this damn thing working with thunderbird. Basically it sends an email using multipart/alternative which, if the email client supports MIME lets it decide whether to show the email in plain text or HTML. PHP Code: EDIT: Updated: Plain and HTML versions can now be defined in the $email_html and $email_plain variables ![]() UPDATED 17/02: USE THIS VERSION! This is much more compatible with different mail services, see notes at top of code for more info ![]() ????: NamePros.com http://www.namepros.com/showthread.php?t=284288 Rep or $NP Appreciated As Always
__________________ -Beaver6813.com - Web Developer Extraordinaire!
Last edited by beaver6813; 02-17-2007 at 02:02 AM.
|
| |
| | THREAD STARTER #4 (permalink) | ||||
| NamePros Regular Join Date: May 2005 Location: England
Posts: 390
![]() ![]() ![]() |
I'm personally using this to send out confirmation emails and what not so you dont have to ask initially whether they just want plain or HTML. Then after they confirm etc ill give them the option to decide whether to have it in plain or html on its own ![]() ????: NamePros.com http://www.namepros.com/showthread.php?t=284288 I multipart/alternative
__________________ -Beaver6813.com - Web Developer Extraordinaire!
Last edited by beaver6813; 01-21-2007 at 12:14 PM.
| ||||
| |
| | #5 (permalink) |
| NamePros Regular Join Date: Jan 2006 Location: San Diego, CA
Posts: 734
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Will use this, thanks edit: also be sure to verify this will work on your server as many large hosting companies (dreamhost included) have been disabling the 4th parameter (headers) on mail().
Last edited by DylanButler; 02-16-2007 at 01:49 PM.
|
| |
| | THREAD STARTER #6 (permalink) |
| NamePros Regular Join Date: May 2005 Location: England
Posts: 390
![]() ![]() ![]() | Will be updating script soon.. gmail didnt like this version so i rewrote for a script i am currently working on I'll cut out the script and update it asap
__________________ -Beaver6813.com - Web Developer Extraordinaire! |
| |
| | THREAD STARTER #8 (permalink) | ||||
| NamePros Regular Join Date: May 2005 Location: England
Posts: 390
![]() ![]() ![]() | MAJOR UPDATE! Read updated first post for more info! ????: NamePros.com http://www.namepros.com/showthread.php?t=284288 Is now compatible with Gmail and other services.
b) i can't do anything about it having just the to, subject and message field is madness if you want to send out a decent email... they really should just filter out specific variables used for spoofing But.. meh!
__________________ -Beaver6813.com - Web Developer Extraordinaire!
Last edited by beaver6813; 02-17-2007 at 02:52 AM.
| ||||
| |
| | #9 (permalink) |
![]() Join Date: Jul 2006
Posts: 4,609
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Thanks for sharing. Great...
__________________ juegosjuegos Your Hotel in Austria Matratzen Domain Acquisition | Store all your favorite links! | Web Proxies Proxy List | Bookmarks | Creative Enquiry | Web Proxy List |
| |
| | #10 (permalink) | ||||
| NamePros Regular Join Date: Jan 2006 Location: San Diego, CA
Posts: 734
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=284288 Ya there's nothing you can do about it. However, hosts are doing it and we will have to account for it nonetheless. | ||||
| |