pascal_22 Posted September 19, 2012 Share Posted September 19, 2012 Hi! One of my members today reply me today and told me that he receive the confirmation registration mail with all div,table,tr,td,p... in his mail... and he asked my why he received it like this.... I use mail() function to send mail and i use html format!!!! What should i do? Stop HTML format and go for text format...? His email is from Free.fr Thank for your help! Pascal Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/ Share on other sites More sharing options...
Christian F. Posted September 19, 2012 Share Posted September 19, 2012 What should i do? Stop HTML format and go for text format...? That would be the optimal solution, as far as I'm concerned, yes. However, if you're dead set on having it send as HTML you should at the very least send a text-only version as well. This is done by using multi-part messages, same as if you were attaching any other file to the email. A quick search on the net should provide you with lots of examples on how to do this, PHPmailer should also be capable of doing this for you with a minimum of work needed. Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379232 Share on other sites More sharing options...
pascal_22 Posted September 19, 2012 Author Share Posted September 19, 2012 Thanks Christian! Yes i already use a bit PHP mailer! you right, i can give html message and text message! One more question.... In a text mail... can i add a link <a href="tomysite"></a> Thanks Pascal Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379236 Share on other sites More sharing options...
premiso Posted September 19, 2012 Share Posted September 19, 2012 One more question.... In a text mail... can i add a link <a href="tomysite"></a> You sure can, however, it probably won't get turned into a link and just look awkward to the person who reads the email Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379294 Share on other sites More sharing options...
Christian F. Posted September 19, 2012 Share Posted September 19, 2012 I must admit that I'm a bit baffled by the fact that you'd ask if you could use a HTML tag in a plain text mail, when the problem was that HTML tags weren't parsed in mails rendered as plain text... Didn't think it quite through, or? Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379359 Share on other sites More sharing options...
pascal_22 Posted September 20, 2012 Author Share Posted September 20, 2012 Thanks!! Yes Christian, it'S a bit strange to ask it... but i asked that because i think it's appreciate for user to have a link to access the website..... But you right i will delete link in text email !! Thanks a loT for all your answer! I appreciate!! Have a great night to all!! Pascal Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379477 Share on other sites More sharing options...
Christian F. Posted September 20, 2012 Share Posted September 20, 2012 You're welcome, glad we could help. PS: It's the clients responsibility whether or not to parse URIs as links in plain text mails, in any case the user knows how his mail client acts. So nothing you have to worry about. Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379489 Share on other sites More sharing options...
pascal_22 Posted September 20, 2012 Author Share Posted September 20, 2012 You right!!! Thanks!!! Have a great day! Pascal Quote Link to comment https://forums.phpfreaks.com/topic/268554-php-send-mail-in-html-or-text/#findComment-1379553 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.