Jump to content

email that go through proxy server


tauchai83

Recommended Posts

my pc is connected to a proxy server and the email i send never reach and never work...how to solve this problems? using php email function, it should able to work either intranet or internet...

here is my code..

<?php
$to      = '[email protected]';
$subject = testing on you;
$message = 'hello how r u?;
$headers = 'From: tauchai.tzo.com' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

do i nit set up outlook and specify the email server? for me, i only a student and i don have the email account with my University. Only i have a web-based microsoft exchange email.

the FROM filed should put localhost??? i have try many times 2day! but never work
Link to comment
https://forums.phpfreaks.com/topic/34546-email-that-go-through-proxy-server/
Share on other sites

You cant send email from local host unless you've set your computer up to run as a mailserver, this requires some configuration of the php.ini file and apache / IIS needs to be set up correctly.

I test mail() scripts on a remote host simply because setting a local mailserver is not a task i relish.

Unfortunatly if you need this to work from localhost your probably going to have to look into setting apache/IIS (whichever u use) up to act as a mailserver.

Sorry i can be more help
this is my mailing script and it works fine for me:
[code]
<?php
$to = '[email protected]';
$subject = testing on you;
$body = 'hello how r u?;

$headers = "MIME-Version: 1.0rn";
$headers .= "Content-type: text/html; charset=iso-8859-1rn";
$headers .= "From: myname<$from>rn";
$headers .= "Return-Path: <$return>";

if (mail($to, $subject, $body, $headers))
?>
[/code]
tell me if it works for you or not,
btw, some servers do not support the mail function, and requires additional payments, you can either upload a script with in order to know information about the email:
[code]
<?php
phpinfo();
?> 
[/code]
or you can ask your support directly, i suggest you email your support.
Good luck
Ted

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.