Can't send email with php mail() when using https

mrzippy

Verified User
Joined
Feb 1, 2004
Messages
5
I have the same script set up in my public_html and my private_html folders.

PHP:
$msg = "This is a test.";
	
$mailheaders = "From: [email][email protected][/email]\r\n";
mail("[email protected]","Testing123", $msg, $mailheaders);

The script works only when called from the public_html folder. (ie: http://domain.com/mail.php)

It does NOT work if I call it from the private_html folder. (ie: https://domain.com/mail.php)

Does anyone know what is the reason for this? I need to have ability to send mail from a php script in the "secure" site area...

!!!!

Thanks.
 
Back
Top