Mail Server Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationMail Server Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 14th, 2004, 04:19 AM
Vy Tien Vy Tien is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 Vy Tien User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I can not use mail() function in php , Help me please !

// this is a mail file
<html>
<head>
<title>Trang goi mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<?php
$to = "vytien123@yahoo.com";
$from = "vytien83@yahoo.com";
$subject = "This is a test email";
$message = "Dear Vy,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Tien.";

$headers = "From: $from\r\n";

$success = mail($to, $subject, $message, $headers);
if ($success)
echo "The email to $to from $from was successfully sent";
else
echo "An error occurred when sending the email to $to from $from";
?>

</body>
</html>


// this is result when I run this page

Warning: mail() [function.mail]: SMTP server response: 550 Unable to relay in d:\webserver\everyone_web\quanlykhachhang\thu\thumail.php on line 16
An error occurred when sending the email to vytien123@yahoo.com from vytien83@yahoo.com


Thanks a lot

Reply With Quote
  #2  
Old August 14th, 2004, 05:41 AM
nogginthenog nogginthenog is offline
Principal Goatkeeper
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Galway, Ireland
Posts: 157 nogginthenog User rank is Corporal (100 - 500 Reputation Level)nogginthenog User rank is Corporal (100 - 500 Reputation Level)nogginthenog User rank is Corporal (100 - 500 Reputation Level)nogginthenog User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 18 h 26 m
Reputation Power: 6
looks like the mail server is refusing the mail because its not sending to the right server. I'm no php expert (check php forum). Are both accounts valid addresses? check smtp server name config in php

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationMail Server Help > I can use mail() function in php , Help me please !


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway