A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Sending HTML emails with PHP?

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Posts
    166
    Can you send HTML encoded emails with the PHP mail function?
    Actually it would be even better if there was a mail application that could do it. It would need to be for PCs. I need to have some images that are on a web server linked in the email without attaching them. The kind of thing you would get from places like Outpost.com and Amazon.
    I remember reading that in order to send an HTML email you needed to change the content type header.

  2. #2
    Senior Member Wancieho's Avatar
    Join Date
    May 2002
    Posts
    370
    Here you go:

    Code:
    $from = "From: Your name <[email protected]>\r\nReturn-Path:[email protected] \r\nMIME-Version: 1.0\r\nContent-Type: text/html; charset=\"iso-8859-1\"";
    
    mail($to,$subject,$body,$from);

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Posts
    166
    Cool.
    Is there a program for PCs that can do the same thing?

  4. #4
    Senior Member Wancieho's Avatar
    Join Date
    May 2002
    Posts
    370
    Not to my knowledge but this is pretty straight forward?

  5. #5
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    if you want your html mails to reach their destination (and not just some people using only outlook), have a look at these articles
    http://www.webmasterbase.com/article.php?pid=24&aid=679
    http://www.webmasterbase.com/article.php?pid=82&aid=679

    I have found that 99.9 % of incoming html-only mails (especially if they are base64 encoded) are just spam. The remainder comes from scripts whose authors do not know any better

    Musicman

  6. #6
    Senior Member Wancieho's Avatar
    Join Date
    May 2002
    Posts
    370
    Hmmmmmm, Musicman does the way i'm doing it get seen as spam?

  7. #7
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    I am using a text-only mail program, so when I get a html-only mail, the program shows two buttons, one to open the browser and one to delete. Which one would you prefer?

    Musicman


Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center