my question is simple...
I have coded the send HTML mail, and plains with attachment but what about HTML with attachments? my header has to be content-type:multipart/mixed; and that doesn't work for HTML messages.
Thanks!
Use something like PHPMailer or SwiftMailer. it's trivial to send out dual html + plaintext emails with attachments and embedded images with either of them, and they're both free and easy to install/use.
Related
I am sending mail using php mailer mail working fine with gmail but when i am sending it to another host email in outlook it add = symbol in link, body contain the link this email is used for forgot password.
this is the normal link
http://support.domain.com/login/resetpw/a3ad3e46c045d98dba19a94dc8a9e4329dcab251/7
It is good when it is coming in gmail inbox
When it comes in outlook it will become like this
http://support.domain.com/login/**=**esetpw/a3ad3e46c045d98dba19a94dc8a9e4329dcab251/7
when i tried to short the url position of the = is changed.
Outlook is known to be buggy in its handling of message bodies using a quoted-printable transfer encoding, which is what this sounds like. Make sure you're using the latest version of PHPMailer which contains workarounds for that.
I want to add an image in the mail headers just like Youtube has when I receive an email from them. I'm simply using the php mail function to send emails, but I can't figure out how to implement this. Am I thinking it wrong?
Here is the final result I want
Thanks for your time,
Felix
You can pass HTML as body in your email.
The only problem is that outlook does not support it.
But all you have to do is build your email body in html and send it using PHP.
For the header it looks more like an tag or something, maybe it's not send via PHP. you could check out software like mailchimp.
P.S. make sure your image is hosting somewhere because you can't access it localy.
Im trying to send messages to a mail account that will only accept rich, or plain text emails. Im aware of the AltBody method, but i want to send the message primary as a rich or plain text email.
Ive looked through the docs but couldn't find an answer, does any one know how i can achieve this ?
Place the HTML (rich) version to normal body and plaintext version to AltBody. Then send the mail as HTML. PhpMailer will send both bodies; clients capable of displaying HTML will display it, others should display plain text version.
So i am using xmail php class to send my mails.
Now that i have quite some users on my site, some user's mail does not have html enabled for their emails. Is there any way I can write a message at the top of the email, or even show another email content, if they view it as text/plain?
If not, what are my options, what can I do? I know one option and that is sending text/plain mails, but these wont even allow html anchor links, which I need for e.g activation mails..
You can send multi-part emails. One part is HTML and then there is a fallback of plain text for non HTML email clients. PHPMailer makes this easy to do.
I making a newsletter for my users and would like to send it using my php.
I use the mailer function which works fine. My problem is as follows.
the email does not appear as it should on gmail and hotmail and this only on the web version. If I use outlook or mail to view the email, then CSS is applied. but when i view the same email on the web, the css seems to be removed.
Any idea as to what I should be doing?
my second question is about the structure of the html email itself. should it have the html and body tags? or would just divs be enough?
would you recommend using tables for the layout, as i have noticed some newsletters using them? maybe that is a better alternative to floats ( for html email only)
Thank you for your help
E-Mail clients do not support the whole spectrum of HTML/CSS features that are supported by today’s web browsers.
See the following for further information:
Email Standards Project
Guide to CSS support in email clients
Gmail's web UI strips all <style> tags.
It should be a completely self sufficient html document with styling included and all paths (links/images/etc...) should be complete paths.