Advanced Search

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Sending HTML email

  1. #11
    Join Date
    Jul 2012
    Posts
    159
    Thanks
    53
    Thanked 2 Times in 2 Posts

    Default

    Hi Beverley,

    Thanks..

    Nice tutorial in first look.

    My next question is for testing the output..
    all modern browsers are supporting html mails, allows me to test the HTML mail, howbeit how can i test the text version of mail.

    Is Lynx browser is applicable for that ?then i cannot use lynx for testing it from my desktop mail client
    OR
    Web developer plugin of mozilla is sufficient or any other suggestions you have ?

    Moreover i will post the result of the output here.

    Regards
    Tom
    You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD)..
    When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

  2. #12
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,541
    Thanks
    16
    Thanked 230 Times in 229 Posts
    Blog Entries
    1

    Default

    all modern browsers are supporting html mails, allows me to test the HTML mail, howbeit how can i test the text version of mail.
    I'm not really sure about that. My own web host only provides a really old, text-based email client on my oldest account, although my newer accounts have much prettier html email clients, so I'm lucky enough to be able to send out test emails and see both results.

    I would imagine that there'd be a setting somewhere in most email clients that allows you to turn-off HTML emails and just display plain text though.

    Here's how to do it in gmail so maybe you could just sign up for a gmail account and test there? http://webapps.stackexchange.com/que...il/43911#43911
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) |
    The only limit to creativity is imagination: JemCon.org

  3. #13
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,165
    Thanks
    62
    Thanked 446 Times in 435 Posts
    Blog Entries
    7

    Default

    Quote Originally Posted by letom View Post
    My next question is for testing the output..
    all modern browsers are supporting html mails, allows me to test the HTML mail. howbeit how can i test the text version of mail.
    Browsers allow you to view your HTML, yes - but again, most emails are not viewed in browsers. If you want to test your emails, it would be advisable to test them in email clients (e.g., Thunderbird or Outlook), not in web browsers.

    Testing text-only emails is easy: the message will look the same as it does in your plain text editor.
    Adrian ~ facebook | gist/github

    ['66.215.156.37','208.75.149.97'] // ip,ip array!
    "Take that sticker *off* your hat; you look stupid" --Wil Wheaton

  4. #14
    Join Date
    Jul 2012
    Posts
    159
    Thanks
    53
    Thanked 2 Times in 2 Posts

    Default

    Quote Originally Posted by traq View Post
    Browsers allow you to view your HTML, yes - but again, most emails are not viewed in browsers. If you want to test your emails, it would be advisable to test them in email clients (e.g., Thunderbird or Outlook), not in web browsers.

    Testing text-only emails is easy: the message will look the same as it does in your plain text editor.
    Adrain,

    Thanks.. under what circumstances the text email contains the coding of html as follows

    Code:
    <table><tr><td>Name</td><td>Jo</td></table>
    I think keeping two separate versions of mail under

    Content-Type: text/plain; charset=UTF-8\n
    Content-Type: text/html; charset=UTF-8\n

    will give an solution for that and it guarantees the result will produced correctly in all environments by stripping unwanted tags as table ?
    You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD)..
    When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

  5. #15
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,165
    Thanks
    62
    Thanked 446 Times in 435 Posts
    Blog Entries
    7

    Default

    Quote Originally Posted by letom View Post
    I think keeping two separate versions of mail under

    Content-Type: text/plain; charset=UTF-8\n
    Content-Type: text/html; charset=UTF-8\n

    will give an solution for that and it guarantees the result will produced correctly in all environments
    Assuming that your messages are correctly formatted and you use the multipart/alternative boundaries properly, the email client will choose which part to display (HTML or plain text, based on its default and/or user settings), and ignore/set aside the other.

    Whether any particular email client will display your HTML "correctly" (i.e., as you expect it to) is a separate issue, however. It will almost certainly look different than it does in the browser (or even any other email client). Getting this "right" is a matter of using the most basic HTML you can, with the most outdated CSS, followed by lots of testing.

    Quote Originally Posted by letom View Post
    under what circumstances the text email contains the coding of html as follows
    Code:
    <table><tr><td>Name</td><td>Jo</td></table>
    I'm not sure what you mean by that. Your text email should not contain HTML markup at all.

    Quote Originally Posted by letom View Post
    by stripping unwanted tags as table ?
    This will not happen - neither the mail() function nor any email client will rewrite your message.
    Adrian ~ facebook | gist/github

    ['66.215.156.37','208.75.149.97'] // ip,ip array!
    "Take that sticker *off* your hat; you look stupid" --Wil Wheaton

  6. The Following User Says Thank You to traq For This Useful Post:

    letom (Yesterday)

  7. #16
    Join Date
    Jul 2012
    Posts
    159
    Thanks
    53
    Thanked 2 Times in 2 Posts

    Default

    Hi Adrain

    Thanks for your advice.. I suggest the phpmailer or swift mailer is the right solution for this.
    under what circumstances the text email contains the coding of html as follows
    Code:

    <table><tr><td>Name</td><td>Jo</td></table>

    I'm not sure what you mean by that. Your text email should not contain HTML markup at all.
    Iam putting both plaintext and html in message ,
    My doubt is whether some email clients will display broken HTML part / HTML coding instead of the HTML design ?
    FYI iam using inline and internal style sheets only with tables..
    You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD)..
    When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

  8. #17
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,165
    Thanks
    62
    Thanked 446 Times in 435 Posts
    Blog Entries
    7

    Default

    Quote Originally Posted by letom View Post
    My doubt is whether some email clients will display broken HTML part / HTML coding instead of the HTML design ?
    Unfortunately, that's not very easy to answer. There are many, many email clients, as well as different versions of each, and almost all of them handle *something* differently. Designing html emails is actually a very tedious task because of this; you simply need to decide which clients are important to you to support and then go test your email in all of them.

    In general, you'll be "okay" in most clients as long as you stick to markup that's been around for the last ten years.
    Adrian ~ facebook | gist/github

    ['66.215.156.37','208.75.149.97'] // ip,ip array!
    "Take that sticker *off* your hat; you look stupid" --Wil Wheaton

  9. The Following User Says Thank You to traq For This Useful Post:

    letom (Yesterday)

  10. #18
    Join Date
    Jul 2012
    Posts
    159
    Thanks
    53
    Thanked 2 Times in 2 Posts

    Default

    You have suggestions for libraries other than phpmailer
    You will know the truth, and the truth will set you free (John 8:32)(The truth is about the only begotten son of GOD)..
    When you feel you are alone for facing your problems, God will never leave you by your own You are important for God

Similar Threads

  1. PHP Email Form not sending to email?
    By euphoriastudio in forum PHP
    Replies: 1
    Last Post: 02-14-2008, 07:04 PM
  2. sending mms to phone via email
    By davidjmorin in forum Looking for such a script or service
    Replies: 0
    Last Post: 01-04-2008, 09:36 PM
  3. PHP Only Sending To One Email
    By tomyknoker in forum PHP
    Replies: 11
    Last Post: 05-06-2007, 11:15 AM
  4. Test sending of email...
    By pavmoxo in forum PHP
    Replies: 0
    Last Post: 08-31-2006, 05:28 PM
  5. Sending an Email
    By Eclyps19 in forum JavaScript
    Replies: 3
    Last Post: 10-29-2005, 09:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •