This is a discussion on Mail attachment questions... within the PHP Language forums, part of the PHP Programming Forums category; Hi Pedro, I know i have to read a lot. :) But sometimes i need a little help from my friends, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Pedro,
I know i have to read a lot. :) But sometimes i need a little help from my friends, because i am the only one in my environment that experiments with php who could help me.. :( Few questions though: I cannot imagine that sending html is too much for automated mail, or shouldn't i take this too literally? Would it be better to send a mail with an image in it with an absolute url instead of attachment? Then renaming files is not-done anymore, but it keeps the mail small... Well thanks anyway!! greetings |
|
|||
|
Hello,
on 12/29/2004 08:58 AM knoak said the following: > I cannot imagine that sending html is too much > for automated mail, or shouldn't i take this > too literally? You should not send HTML only messages, as your messages may be blocked for seeming like SPAM. What you need to do is to compose a multipart/alternative message that includes both an HTML part and an alternative plain text part. > Would it be better to send a mail with an image in it > with an absolute url instead of attachment? Then renaming > files is not-done anymore, but it keeps the mail small... > Well thanks anyway!! It depends on the importance of the images for your messages. Most modern webmail and e-mail clients tend to not show remote images in the messages as it may be a beacon to invade the user privacy to determine when the message was received. You can include images within the message body that are treated as part of the HTML message using multipart/related message parts. This is a little complicated but fortunately there are ready to use classes to help you compose and send proper HTML messages, like for instance this MIME message class: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html |
|
|||
|
Hello,
on 12/29/2004 08:58 AM knoak said the following: > I cannot imagine that sending html is too much > for automated mail, or shouldn't i take this > too literally? You should not send HTML only messages, as your messages may be blocked for seeming like SPAM. What you need to do is to compose a multipart/alternative message that includes both an HTML part and an alternative plain text part. > Would it be better to send a mail with an image in it > with an absolute url instead of attachment? Then renaming > files is not-done anymore, but it keeps the mail small... > Well thanks anyway!! It depends on the importance of the images for your messages. Most modern webmail and e-mail clients tend to not show remote images in the messages as it may be a beacon to invade the user privacy to determine when the message was received. You can include images within the message body that are treated as part of the HTML message using multipart/related message parts. This is a little complicated but fortunately there are ready to use classes to help you compose and send proper HTML messages, like for instance this MIME message class: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html |