Reputation: 1818
I am using phpmailer to send my newsletter to my subscribers.
I set my headers as following:
$headers = "From: Sales - Blah Blah <[email protected]>";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=utf-8\r\n";
NOW, in the delivered email, for example in a gmail account, if you press the "show details" link, the following appears.
from Sales - Blah Blah MIME-Version: 1.0
[email protected] via ecbiz103.inmotionhosting.com
to [email protected]
date Wed, Aug 3, 2011 at 11:02 AM
subject sales !
***mailed-by ecbiz103.inmotionhosting.com***
HERE IS THE QUESTION:
HOW CAN I MAKE IT ACTUALLY SEND THE EMAIL FROM THE ACTUAL EMAIL ACCOUNT, that is "[email protected]" and be able to see the outgoing emails on my "sent" tab?
I guess, when this happens, the last line mentioned in bold would say
"mailed by blahblah.com"
Regards, George
Upvotes: 0
Views: 242
Reputation: 27618
The simple answer is: you cant.
All phpmailer does is connect to the mail server to send the mail. It does not link to your actual e-mail account in any way at all.
EDIT:
Also, you will not be able to remove the ecbiz103.inmotionhosting.com
reference as that is the hostname of the server that is sending the mail. A mail server runs on one IP address, this IP has a hostname, in this case ecbiz103.inmotionhosting.com
.
Upvotes: 1
Reputation: 15301
You don't have a newline after the first line of headers, specifically the From
header.
Upvotes: 0
Reputation: 360662
PHPmailer as in http://phpmailer.worxware.com? Or do you mean PHP's built-in mail()
function? It would appear you're using mail(), since you're building your own MIME message. Don't do that. It's too much main and unreliable. use PHPmailer (at the link mentioned earlier) or Swiftmailer to do that sort of thing for you.
Either way, if you want the mails you send to show up in your account's "sent" folder, you'd have to send the emails via your own email account using blahblah.com's mail server. Another option would be to set a BCC: to silently copy yourself on each mail, and have a mail rule on your account to divert those mails to a folder.
Upvotes: 1