Please Help me to send Mails
Moderator: General Moderators
Please Help me to send Mails
I need to know what i need to use the mail function successfully cause i got this massage and , thank you for your time
- Attachments
-
- smtp.jpg (138.85 KiB) Viewed 3678 times
- PHPHorizons
- Forum Contributor
- Posts: 175
- Joined: Mon Sep 14, 2009 11:38 pm
Re: Please Help me to send Mails
Hello minos_mks,
You will need a mail server. Pegasus Mail/Mercury Mail comes to mind: http://www.pmail.com/
One problem you may have though is mail() does not allow authentication. And if you are planning on using Yahoo to send those mails out, I've had difficulty getting that to work.
You could purchase an SMTP Relay Service. Here's a google search on that: http://www.google.com/search?num=30&hl= ... y&gs_rfai=
Cheers
You will need a mail server. Pegasus Mail/Mercury Mail comes to mind: http://www.pmail.com/
One problem you may have though is mail() does not allow authentication. And if you are planning on using Yahoo to send those mails out, I've had difficulty getting that to work.
You could purchase an SMTP Relay Service. Here's a google search on that: http://www.google.com/search?num=30&hl= ... y&gs_rfai=
Cheers
-
Phoenixheart
- Forum Contributor
- Posts: 123
- Joined: Tue Nov 16, 2004 7:46 am
- Contact:
Re: Please Help me to send Mails
As the error box shows, you need to populate proper SMTP settings in php.ini (either direct modification or using ini_set()).
As far as I remember you can try Gmail's SMTP.
As far as I remember you can try Gmail's SMTP.
Re: Please Help me to send Mails
thanx every body for your time but , i have already the smtp ( hotmail ) smtp.live.com but i don't know what i should do with it , if there is any chance if somebody have like a video or any lesson explain this issue step by step because i am confused , thanx a lot
-
internet-solution
- Forum Contributor
- Posts: 220
- Joined: Thu May 27, 2010 6:27 am
- Location: UK
Re: Please Help me to send Mails
Get SMTP srever settings (server name, port, user name, password) from hotmail and then use fsocopen() function. see an example here on my site
Last edited by internet-solution on Mon Jun 21, 2010 12:10 pm, edited 1 time in total.
Re: Please Help me to send Mails
thanx man for your time
but i did the same and just change my information like this :
and it gives me an error it said :
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.mail.yahoo.com:25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in C:\wamp\www\Coptic_List\includes\admin_functions.php on line 112
Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\Coptic_List\includes\admin_functions.php on line 112
but i did the same and just change my information like this :
Code: Select all
$smtp_server = "smtp.mail.yahoo.com";
$mydomain = "any_text_here";
//get the following info from your mail server eg. au.yahoo.com
$port = 25; //SMTP PORT of mail.mymailserver.com
$username = "mina_mks2003@yahoo.com"; $password = "*********";
$sender = "mina_mks2003@yahoo.com";
/*
Most respectable mail servers will reject outgoing mail
if $sender e-mail address does not belong to $username
*/
$sender_name = "Mina"; //Any name you fancy
$recipient = "minos_saad@hotmail.com";
$subject = "the subject";
$content = "the message";
// SMTP connection
$handle = fsockopen($smtp_server,$port);
fputs($handle, "EHLO $mydomain\r\n");
// SMTP authorization
fputs($handle, "AUTH LOGIN\r\n");
fputs($handle, base64_encode($username)."\r\n");
fputs($handle, base64_encode($password)."\r\n");
// Send out the e-mail
fputs($handle, "MAIL FROM:$sender\r\n");
fputs($handle, "RCPT TO:$recipient\r\n");
fputs($handle, "DATA\r\n");
fputs($handle, "From: $sender_name<$sender>\r\n");
//you can use different e-maill address in above line, but most spam blockers will suspect this
fputs($handle, "To: $recipient\r\n");
fputs($handle, "Subject: $subject\r\n");
fputs($handle, "$content\r\n");
fputs($handle, ".\r\n");
//Don't ignore the period "." in line above. This indicates the end of your mail
// Close connection to SMTP server
fputs($handle, "QUIT\r\n");and it gives me an error it said :
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.mail.yahoo.com:25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in C:\wamp\www\Coptic_List\includes\admin_functions.php on line 112
Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\Coptic_List\includes\admin_functions.php on line 112
Last edited by Benjamin on Fri Jun 18, 2010 9:56 pm, edited 1 time in total.
Reason: Added [syntax=php] tags.
Reason: Added [syntax=php] tags.
-
internet-solution
- Forum Contributor
- Posts: 220
- Joined: Thu May 27, 2010 6:27 am
- Location: UK
Re: Please Help me to send Mails
Are you sure you are using the correct sptm server information? In you previous post you mentioned hotmail (smtp.live.com), why are you using yahoo in the script?
Do you have a Yahoo premium account? Yahoo pop / smtp connection is only available to premuim accounts.
Do you have a Yahoo premium account? Yahoo pop / smtp connection is only available to premuim accounts.
Re: Please Help me to send Mails
i was just trying to use a different smtp server , but i didn't know that it's not free , i don't know now if the problem now only the smtp or maybe another problems , and what about if i need to change the smtp server inside the php.ini , thanx for your help