[PHP] HTML email with Outlook

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Re: [PHP] HTML email with Outlook

    I would take a look at the headers of an email that does render html
    correctly in outlook and see what you are missing.

    Trial and error.

    Jim Lucas

    ----- Original Message -----
    From: "Tim Thorburn" <immortal@nwconx.net>
    To: <php-general@lists.php.net>
    Sent: Tuesday, July 15, 2003 3:48 PM
    Subject: [PHP] HTML email with Outlook

    > Hi,
    >
    > I've made a PHP script that sends out an automatic email through my
    servers
    > cron system, it works well, but I thought I'd try to do some HTML email to
    > get things to line up a little better.
    >
    > To do so, I added the following line in my mail() command: -Type:
    > text/html; charset=iso-8859-1
    >
    > When I check the messages sent out with Eudora, the HTML email comes in
    > perfectly. However, when I check with Outlook Express 6 - I get the
    actual
    > HTML code rather than the nicely formatted email that I had created.
    >
    > Should I be using another line in my mail() command? I've recieved HTML
    > email before with Outlook Express on my machine without changing any
    > settings at all. Also, I had sent an email from my script to hotmail and
    > the HTML email worked fine there too.
    >
    > Any thoughts?
    >
    > Thanks
    > -Tim
    >
    >
    >
    > --
    > PHP General Mailing List (http://www.php.net/)
    > To unsubscribe, visit: http://www.php.net/unsub.php
    >
    >
    Jim Lucas Guest

  2. Similar Questions and Discussions

    1. Can coldfusion access Outlook email contacts?
      Hey can someone tell me how or if coldfusion can access outlook email contacts, i think it can be done using the COM objects but I am not sure, any...
    2. Converting Outlook Email to PDFs
      How do I covert Outlook email into searchable PDFs? I would like to use this conversion function on both individual emails and my email folders. I...
    3. how to open an email from outlook without opening a browser???
      Hi all, I have been using GotoNetPage for launching an email message from outlook but this opens a browser as well with a no load page.... how...
    4. Outlook sends my email
      Hey I have created a form that allows the user to submit the form via email. But when I hit the submit, it wants to use my outlook to send the...
    5. Formatting an email to arrive as an appointment in Outlook
      I need/want to be able to send an email from a website running IIS and CDONTS for mail (or ASPMAIL) that comes into the inbox as an appointment to...
  3. #2

    Default RE: [PHP] HTML email with Outlook

    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

    Does this help?

    Johnny

    -----Original Message-----
    From: Tim Thorburn [mailto:immortal@nwconx.net]
    Sent: Tuesday, July 15, 2003 3:48 PM
    To: [email]php-general@lists.php.net[/email]
    Subject: [PHP] HTML email with Outlook


    Hi,

    I've made a PHP script that sends out an automatic email through my servers
    cron system, it works well, but I thought I'd try to do some HTML email to
    get things to line up a little better.

    To do so, I added the following line in my mail() command: -Type:
    text/html; charset=iso-8859-1

    When I check the messages sent out with Eudora, the HTML email comes in
    perfectly. However, when I check with Outlook Express 6 - I get the actual
    HTML code rather than the nicely formatted email that I had created.

    Should I be using another line in my mail() command? I've recieved HTML
    email before with Outlook Express on my machine without changing any
    settings at all. Also, I had sent an email from my script to hotmail and
    the HTML email worked fine there too.

    Any thoughts?

    Thanks
    -Tim



    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    Johnny Martinez Guest

  4. #3

    Default Re: [PHP] HTML email with Outlook

    Tim Thorburn <immortal@nwconx.net> wrote:
    > Hi,
    >
    > I've made a PHP script that sends out an automatic email through my servers
    > cron system, it works well, but I thought I'd try to do some HTML email to
    > get things to line up a little better.
    >
    > To do so, I added the following line in my mail() command: -Type:
    > text/html; charset=iso-8859-1
    > When I check the messages sent out with Eudora, the HTML email comes in
    > perfectly. However, when I check with Outlook Express 6 - I get the actual
    > HTML code rather than the nicely formatted email that I had created.
    >
    > Should I be using another line in my mail() command? I've recieved HTML
    > email before with Outlook Express on my machine without changing any
    > settings at all. Also, I had sent an email from my script to hotmail and
    > the HTML email worked fine there too.
    there are different ways to send html in an email and also very wrong
    ways to send html in an email; very debatable topic from what I've seen.
    I think your best bet is to use something like:

    [url]http://phpmailer.sourceforge.net/[/url]

    You can send both plain/text and html. Remember not all email clients
    support email. And a lot of people dont like it at all.

    Of course if this is only for you to see I guess you can ignore all that
    i said :)



    Curt
    --




    Curt Zirzow Guest

  5. #4

    Default RE: [PHP] HTML email with Outlook

    "Remember not all email clients support email."

    Did I read that right or is it a typo?

    J

    -----Original Message-----
    From: Curt Zirzow [mailto:curt@zirzow.dyndns.org]
    Sent: Tuesday, July 15, 2003 4:17 PM
    To: [email]php-general@lists.php.net[/email]
    Subject: Re: [PHP] HTML email with Outlook


    Tim Thorburn <immortal@nwconx.net> wrote:
    > Hi,
    >
    > I've made a PHP script that sends out an automatic email through my
    servers
    > cron system, it works well, but I thought I'd try to do some HTML email to
    > get things to line up a little better.
    >
    > To do so, I added the following line in my mail() command: -Type:
    > text/html; charset=iso-8859-1
    > When I check the messages sent out with Eudora, the HTML email comes in
    > perfectly. However, when I check with Outlook Express 6 - I get the
    actual
    > HTML code rather than the nicely formatted email that I had created.
    >
    > Should I be using another line in my mail() command? I've recieved HTML
    > email before with Outlook Express on my machine without changing any
    > settings at all. Also, I had sent an email from my script to hotmail and
    > the HTML email worked fine there too.
    there are different ways to send html in an email and also very wrong
    ways to send html in an email; very debatable topic from what I've seen.
    I think your best bet is to use something like:

    http://phpmailer.sourceforge.net/

    You can send both plain/text and html. Remember not all email clients
    support email. And a lot of people dont like it at all.

    Of course if this is only for you to see I guess you can ignore all that
    i said :)



    Curt
    --





    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    Johnny Martinez Guest

  6. #5

    Default RE: [PHP] HTML email with Outlook

    By the context, I'm sure it should read "...not all email clients
    support HTML."

    (I got a laugh out of it though ;)

    -----Original Message-----
    From: Johnny Martinez [mailto:jmartinez@citrusglobal.com]
    Sent: Tuesday, July 15, 2003 7:21 PM
    To: 'Curt Zirzow'; [email]php-general@lists.php.net[/email]
    Subject: RE: [PHP] HTML email with Outlook


    "Remember not all email clients support email."

    Did I read that right or is it a typo?

    J

    -----Original Message-----
    From: Curt Zirzow [mailto:curt@zirzow.dyndns.org]
    Sent: Tuesday, July 15, 2003 4:17 PM
    To: php-general@lists.php.net
    Subject: Re: [PHP] HTML email with Outlook


    Tim Thorburn <immortal@nwconx.net> wrote:
    > Hi,
    >
    > I've made a PHP script that sends out an automatic email through my
    servers
    > cron system, it works well, but I thought I'd try to do some HTML
    > email to
    > get things to line up a little better.
    >
    > To do so, I added the following line in my mail() command: -Type:
    > text/html; charset=iso-8859-1
    > When I check the messages sent out with Eudora, the HTML email comes
    in
    > perfectly. However, when I check with Outlook Express 6 - I get the
    actual
    > HTML code rather than the nicely formatted email that I had created.
    >
    > Should I be using another line in my mail() command? I've recieved
    > HTML
    > email before with Outlook Express on my machine without changing any
    > settings at all. Also, I had sent an email from my script to hotmail
    and
    > the HTML email worked fine there too.
    there are different ways to send html in an email and also very wrong
    ways to send html in an email; very debatable topic from what I've seen.
    I think your best bet is to use something like:

    http://phpmailer.sourceforge.net/

    You can send both plain/text and html. Remember not all email clients
    support email. And a lot of people dont like it at all.

    Of course if this is only for you to see I guess you can ignore all that
    i said :)



    Curt
    --





    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php




    Mike Brum Guest

  7. #6

    Default Re: [PHP] HTML email with Outlook

    Hello,

    On 07/15/2003 07:48 PM, Tim Thorburn wrote:
    > I've made a PHP script that sends out an automatic email through my
    > servers cron system, it works well, but I thought I'd try to do some
    > HTML email to get things to line up a little better.
    >
    > To do so, I added the following line in my mail() command: -Type:
    > text/html; charset=iso-8859-1
    >
    > When I check the messages sent out with Eudora, the HTML email comes in
    > perfectly. However, when I check with Outlook Express 6 - I get the
    > actual HTML code rather than the nicely formatted email that I had created.
    >
    > Should I be using another line in my mail() command? I've recieved HTML
    > email before with Outlook Express on my machine without changing any
    > settings at all. Also, I had sent an email from my script to hotmail
    > and the HTML email worked fine there too.
    That looks like one of the bugs of the mail() function that never got
    fixed. In that case you may want to try this class that has built-in
    workarounds for some of the mail() function bugs.

    [url]http://www.phpclasses.org/mimemessage[/url]

    --

    Regards,
    Manuel Lemos

    Free ready to use OOP components written in PHP
    [url]http://www.phpclasses.org/[/url]

    Manuel Lemos Guest

  8. #7

    Default Re: [PHP] HTML email with Outlook

    Thanks to all those who responded, as always, spelling is key. Where I had
    -Type: text/html ... it should have read Content-Type : text/html ...

    So it works for now, and hopefully will continue to. I know that there are
    a number of email programs out there that do not support HTML mail, as well
    I know there are a great many of individuals who do not enjoy it
    either. We're just running a trial base here to see what works, if it
    turns out that the majority of our customers do not enjoy it, then we'll
    switch to plain text (actually built the plain-text one first, this is just
    an add-on)




    Tim Thorburn Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139