Hello friends
I want to send mail from from one mail server to other:
for example
from aaa@yahoo.com to aaa@rediffmail.com.
if i am using the default setting of php.ini and write the mail function i am not able to do this can anybody helps me that how can i do this.
mail from one mail server to other mail server
Moderator: General Moderators
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
thanks
i am using the simple code
<?php
mail("aaa@rediffmail.com","testing","test");
?>
and in php.ini file i had changed the sendmail_from :aaa@yahoo.com and rest settings are default
i am using the simple code
<?php
mail("aaa@rediffmail.com","testing","test");
?>
and in php.ini file i had changed the sendmail_from :aaa@yahoo.com and rest settings are default
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
I just tosed this together It should work but I havn't tested it..
on your code you didn't add "From: $email\r\nReply-to: $email\r\n" that to it so you could also do it this way
Code: Select all
<?
$mailto = "aaa@rediffmail.com"; //email you are sending to
$email ="aaa@yahoo.com"; //From email
$message = "Test"; //message body
$subject = "Testing"; //Subject line
$msg = ereg_replace("\\''", "'", $message);
$msg = ereg_replace('"', """, $msg);
$message1 = "From: $name\nemail: $email\nmessage:\n$msg1";
mail($mailto, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
?>Code: Select all
<?
mail("aaa@rediffmail.com", "testing", "test", "From: aaa@rediffmail.com\r\nReply-to: aaa@rediffmail.com\r\n");
?>