I am using PEAR mail system to send authenticated mails.I need to send HTML mails that has alinks.It was working fine before i started using PEAR mail.Now i am not able to s
Please note that the example posted by karim79 has a header parameter that may cause you much grief: "Return-Path" - when I included this parameter like the example it prevented me from adding a from name, only a sender email address worked.
Specifically (when I added a debug param to see what was happening) there were extra angle brackets added around the from name so it tried to send this to the smtp server:
From:
From: <"from name"
This caused the smtp connection to quit with an error of invalid address.
Also when using the mime_mail class you need to specify the "To:" parameter in the headers or it will appear to be sent to undisclosed addresses when you receive it. So replace the Return-Path param with a To param and it will work.