|
-
Jun 11th, 2006, 10:27 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Problem in sending emails
Hello
I have a website and I have email named "[email protected]".
I'm trying to send emails from it by PHP page.
I was using this code:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=windows-1256\r\n";
$headers .= "From: My Name <[email protected]>\r\n";
$to = The email which I wanna send to... (Hotmail email).
$message = "<html><body><p align=center>Hello</p></body></html>";
mail ($to,"Subject",$message,$headers);
Since days, it was working but now it can't send emails.
Emails never come to receivers.
What's problem, please?
I need help.
Thanks & Regards
-
Jun 11th, 2006, 11:10 PM
#2
Re: Problem in sending emails
Does it work if you try sending it to another email address?
-
Jun 11th, 2006, 11:28 PM
#3
Thread Starter
Addicted Member
Re: Problem in sending emails
no, it never works even I if used other addresses.
Last edited by onh1986; Jun 11th, 2006 at 11:54 PM.
-
Jun 11th, 2006, 11:31 PM
#4
Re: Problem in sending emails
At the top of the script, put the following line. See if you get any errors:
PHP Code:
error_reporting(E_ALL);
-
Jun 11th, 2006, 11:57 PM
#5
Thread Starter
Addicted Member
Re: Problem in sending emails
-
Jun 12th, 2006, 12:44 AM
#6
Re: Problem in sending emails
Well that rules out a problem with PHP. Is this a Windows or UNIX system? If it is Windows, what SMTP server are you using?
-
Jun 12th, 2006, 01:57 PM
#7
Thread Starter
Addicted Member
Re: Problem in sending emails
Windows XP.
My smtp I use is "mail.onh1986.com"
-
Jun 12th, 2006, 04:22 PM
#8
<?="Moderator"?>
Re: Problem in sending emails
have you changed the PHP.ini (ini_set()) file value for the smtp server to use mail.onh1986.com?
-
Jun 12th, 2006, 05:01 PM
#9
Thread Starter
Addicted Member
Re: Problem in sending emails
How can I change it.
I mean how I can find PHP.ini file and what the code I have to write is.
Thanks
-
Jun 12th, 2006, 05:50 PM
#10
Re: Problem in sending emails
The php.ini file ought to be in your PHP installation location. You can just edit it with a text editor. Search for the phrase "smtp" and follow the instructions in the comments.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jun 12th, 2006, 06:29 PM
#11
<?="Moderator"?>
Re: Problem in sending emails
Check out these links for info about php.ini. The file is normally in the same folder as the PHP binary file or for windows in the Windows or Winnt folder.
http://uk2.php.net/manual/en/ini.php#ini.list
http://uk2.php.net/manual/en/ref.mail.php#ini.smtp
-
Jun 13th, 2006, 05:26 PM
#12
Thread Starter
Addicted Member
Re: Problem in sending emails
OK
I couldn't find PHP.ini file in my website.
How can I edit it?
Thanks
-
Jun 13th, 2006, 05:34 PM
#13
Re: Problem in sending emails
Just use ini_set(). You can find thel ocation of php.ini by calling phpinfo() function.
-
Jun 13th, 2006, 08:10 PM
#14
Thread Starter
Addicted Member
Re: Problem in sending emails
-
Jun 23rd, 2006, 09:30 AM
#15
Fanatic Member
Re: [RESOLVED] Problem in sending emails
i know the thread starter has mark this thread as resolved but i don't want to create a new thread since i'm also having the same problem.
it's not working for me(even after i went through and follow all the given step(s)
i'm on Window XP Pro and i run my scripts locally.
pls help...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|