Re: HTML emails with attachments



Hello,

on 05/27/2008 10:12 PM Brian said the following:
Last week I spent hours trying to get a form script to work as it wouldn't
format correctly, I thought I had working OK. It's a standard form that gets
submitted, this data gets turned into HTML content and a file attachment, it's
works fine for me using Outlook 2003, but the person this script is for that
also uses outlook 2003 is getting it as an unformatted email see below,
below this I have put my code, have ai missed something?

Maybe the mail server that is receiving the message is converting it to
text for security reasons.

The matter is that regular mail programs do not send HTML messages like
you did. Usually there is a plain text message part also included in the
message as alternative to the HTML part for mail programs that do not
support HTML mail. The absence of the alternative text part may be
understood as possible spam.

Therefore I recommend to compose HTML messages properly with alternative
text parts.

If you are not sure how to do that, you may want to take a look at the
MIME message composing and sending class. Take a look at the
test_html_mail_message.php example script.

http://www.phpclasses.org/mimemessage



--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
.



Relevant Pages

  • Re: How do we get there from here?
    ... > then sub the whole of that generated markup into the template? ... layed out on the fly, a simple IMG tag, or even an entire HTML document. ... PHP scripting provides 10 times the features of both of these ... idea as tokens can eliminate a huge amount of maintance, ...
    (comp.databases.pick)
  • Re: query string passing woes........ help... please....
    ... |> | offer any help other than saying that my validation could be FAR more ... I'm a total newbie at php. ... The easiest way for you would be to make the html form called form.php ... $_SESSION array using the same names. ...
    (alt.php)
  • Re: HELP - Cant change Include Path
    ... Here is my php.ini path for the php.ini in both php and sql dirs: ... which did work on the remote linux server and sent me some mail ... Although my gmail acct picked the mail up as ... an attachment instead of as html - but gmail is really wierd about ...
    (comp.lang.php)
  • Re: How do we get there from here?
    ... server-side-scripted html. ... This is a simple example with very little php scripting. ... means that the version of the php pre-processor on your web server must ... >>> The browser never sees anything not sent to it by the script. ...
    (comp.databases.pick)
  • Re: PHP-Yes, HTML-No --- Why?
    ... Because the files, when downloaded, are called .php and have absolutely no php in them:) ... But the extension doesn't match the contents of the file. ... Surely a dynamic web server should appear exactly the same as a static one - all files that contain HTML when viewed should be called .html. ...
    (comp.lang.php)