3rd party email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kathy Lince
Forum Newbie
Posts: 1
Joined: Tue Oct 17, 2006 11:30 am

3rd party email

Post by kathy Lince »

Everah | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I am having a problen with 3rd party server.....They are not receiving their e-mail.  The code is working on my server

my code:

Code: Select all

<?php
$todayis = date("l, F j, Y, g:i a") ;

$subject = "Property Profile"; 


$message = "$todayis [EST] \n


From: $owner ($email) \n\r
Address:      $address \n\r
County:       $county \n\r
Realtor:      $realtor \n\r
Phone:        $phone \n\r
Fax:          $fax \n\r
Need by date: $date \n\r";

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


mail ("needhelp@company.com", "$subject", "$message", "From: $from");
?>

Everah | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Does your actual mail server software show an error in its log?
You might also be interested in http://sourceforge.net/projects/swiftmailer and viewforum.php?f=52

please use

Code: Select all

tags when posting php code.

Code: Select all

<?php
$todayis = date("l, F j, Y, g:i a") ;

$subject = "Property Profile";


$message = "$todayis [EST] \n


From: $owner ($email) \n\r
Address: $address \n\r
County: $county \n\r
Realtor: $realtor \n\r
Phone: $phone \n\r
Fax: $fax \n\r
Need by date: $date \n\r";

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


mail ("needhelp@company.com", "$subject", "$message", "From: $from");
?>
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Try doing an if check against the mail() call to see if the mail was accepted for delivery successfully.

Code: Select all

<?php
if (mail(...))
{
  echo 'woopee!';
}
else
{
  echo 'Bugger.';
}
?>
Also, per the manual,
Each line should be separated with a LF (\n). Lines should not be larger than 70 characters.
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

Post Reply