1

I am currently working on a project where I am accessing an e-mail account using PHP's imap_open(). I know that I can send an e-mail with PHP using the mail() function.

However, I was wondering if, after I send an e-mail, I could place that e-mail in the email account's sent folder using any of PHP's imap functions.

Any help would be greatly appreciated.

smf7293
  • 55
  • 3
  • 9
  • Possible duplicate: http://stackoverflow.com/questions/8561495/sent-mails-with-phpmailer-dont-go-to-sent-imap-folder/8561849 – Repox Jun 11 '12 at 07:18
  • 1
    Thanks, I'll look into the imap_append() function. That could be the answer. – smf7293 Jun 11 '12 at 07:30

1 Answers1

0

This is more to email account setting to save the email sent to sent account folder.

You may try with external mail that already configured to save email sent to sent folder e.g Gmail http://www.vulgarisoip.com/files/phpgmailer.zip

example :

require_once('/phpgmailer/class.phpgmailer.php');
$mail = new PHPGMailer();
$mail->Username = 'user@domain.com'; 
$mail->Password = 'password';
$mail->From = 'user@domain.com'; 
$mail->FromName = 'User Name';
$mail->Subject = 'Subject';
$mail->AddAddress('myfriend@domain.com');
$mail->Body = 'Hey buddy, here\'s an email!';
$mail->Send();
powtac
  • 40,542
  • 28
  • 115
  • 170
AzizSM
  • 6,199
  • 4
  • 42
  • 53