Reputation: 6251
Is there any way to send mail from a gmail account to someone? And by "from" i mean so that it stores the email in the gmail inbox aswell...?
I've tried using imap, but i'm not sure if that's the correct way? Either way i get this error:
Warning: imap_mail() [function.imap-mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\gmail\index.php on line 12
Any idas how to achieve this?
Thanks!
Upvotes: 0
Views: 3916
Reputation: 12135
You could do the same thing email clients do: Send your mail through SMTP and then create a mail in the Sent folder through IMAP.
Upvotes: 0
Reputation:
Try using smtp instead, Gmail will put your email in sent folder for you. All the instructions are provided in the settings page of your gmail account.
http://deepakssn.blogspot.com/2006/06/gmail-php-send-email-using-php-with.html
Upvotes: 1