I want to know what configuration changes are required in Local machine to use mail (); function in Localhost to delivered on internet.
1) There are compulsory to install and configure mail server on Localhost to use mail (); ?
2) I have installed WAMP 5 in my localhost machine any change in WAMP configuration file also need to use mail (); ?
3) POP3, MIME, etc also required ?
4) Any more information to complete this task please welcome?
5) Overall my aim is to use mail() in WAMP5 and it should be delivered. OK.
I read in the web page that :
The mail() function allows you to send emails directly from a script.
This function returns TRUE if the email was successfully accepted for delivery, otherwise it returns FALSE.
to Required. Specifies the receiver / receivers of the email
subject Required. Specifies the subject of the email. Note: This parameter cannot contain any newline characters
message Required. Defines the message to be sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters.
Windows note: If a full stop is found on the beginning of a line in the message, it might be removed. To solve this problem, replace the full stop with a double dot:headers Optional. Specifies additional headers, like From, Cc, and Bcc. The additional headers should be separated with a CRLF (\r\n).
<?php$txt = str_replace("\n.", "\n..", $txt);
Note: When sending an email, it must contain a From header. This can be set with this parameter or in the php.ini file.
parameters Optional. Specifies an additional parameter to the sendmail program (the one defined in the sendmail_path configuration setting). (i.e. this can be used to set the envelope sender address when using sendmail with the -f sendmail option)
Web page also have sample Example:I make changes as where needed but my mail is not delivered,
<?php$to = "email@example.com, firstname.lastname@example.org";
$subject = "HTML email";
$message = "
<p>This email contains HTML Tags!</p>
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// More headers
$headers .= 'From: <email@example.com>' . "\r\n";
$headers .= 'Cc: firstname.lastname@example.org' . "\r\n";
So please anybody could help how to we success in delivering mail from my local WAMP5 to On Internet.
A couple of years ago i was in the same situation as you, the solution to this problem is to use a SMTP server on your local machine. This SMTP server will be in charge of sending all the emails that your php script will send with the mail() function.
You can use the SMTP server that comes with any Windows Operating System since Windows 2000 Pro or you can use any other SMTP server.
At first you can think that the SMTP server that comes with Windows is the best choice, but my experience with this server was very bad because it is not easy to configure as you may think, so i suggest you to do not use it, instead you can use any other SMTP server that you want.
The SMTP Server that i use at that moment was ArGoSoft Mail Server version 22.214.171.124 which was free for personal use and provides the service for three standard Internet protocols: SMTP, POP3 and Finger, it was very easy to install, configure and use, and i can say that it works very well. The new version of ArGoSoft Mail Server is version 126.96.36.199 and it is still free, as usual this new version corrects bugs and some other things.
For more information and all the details related please visit the ArGoSoft Mail Server page. Also, i recommend you to view the details of the new mail server offered by its creators called ArGoSoft Mail Server .NET!, and then decide which one you will use.
Best regards,Does not respondIn Php- How To Send Mail From Localhost To Web Mail Server
I performed all the steps mentioned above but it takes too long time to execute the file.After this line execution stops..And mail is also not delivered.
$mail = $smtp->send($to, $headers, $body);
|VIEW DESKTOP VERSION||REGISTER||GET FREE HOSTING|