jorley Posted February 15, 2010 Share Posted February 15, 2010 I am trying to set up a php email that will detect if html is accepted in the client it is sent to and if so it will show the HTML if not it will show a different email. I have read about some ways to do this but nothing has been informative enough to finalize it. Has anyone done something like this and if so can you point me in the right direction? Quote Link to comment Share on other sites More sharing options...
PHP Monkeh Posted February 15, 2010 Share Posted February 15, 2010 If you want to know whether the user can read HTML emails, the only way to do that is to ask them (it's common to ask whether the user wants HTML/Plain Text emails). Quote Link to comment Share on other sites More sharing options...
jorley Posted February 15, 2010 Author Share Posted February 15, 2010 Let me elaborate a little more, I should have put this in the original. The site I am building for my client is a social network. So there are potentially thousands of users. When they register they get an activation email jus tlike this site sends out. I noticed they had a boundary on it which is what I read is what you use to do this such a thing. I cannot ask every user if they have html because they are not even users until they activate and if I send that first email in hml and they don't have it as an accepted method then the email will look broken. Thoughts? Quote Link to comment Share on other sites More sharing options...
PHP Monkeh Posted February 15, 2010 Share Posted February 15, 2010 Gotcha, look into multipart emails - there are quite a few tutorials from a google search for 'php multipart emails' Quote Link to comment Share on other sites More sharing options...
Splash Posted February 15, 2010 Share Posted February 15, 2010 The PHPMailer class is perfect for this: http://sourceforge.net/projects/phpmailer/ Quote Link to comment 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.