Page 1 of 1

not getting email sending from website

Posted: Thu Jul 19, 2007 10:27 pm
by shiyou
feyd | 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 have some problem in sending emails from the website back to my email address. 

I am not sure is there anything to do with the incoming server port. Because usually it is set to 110, but my this email is set to 9000. 

I tried using normal php mail function and PHPMailer.

Code: Select all

$to='me@mycompanyemail.com';
$subject='Testing email';
$message='Just a testing email';
// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		
// Additional headers
$headers .= 'From:  <'.$email.'>' . "\r\n";
		
if ($strmail=mail($to, $subject, $message, $headers))
{
   echo "sucessful";
}
else
{
   echo "Error email";
}
The outcome of this is sucessful, but I didn't receive any email from my inbox nor my junk mail.

Where have my mail been? is there any way that I can do?? Please help!!!


feyd | 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]

Posted: Thu Jul 19, 2007 10:42 pm
by Benjamin
The PHP Manual wrote: Note: If messages are not received, try using a LF (\n) only. Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.
You'll also want to ensure the return path is being set.

Posted: Fri Jul 20, 2007 5:25 am
by Phoenixheart
Also, did you set the email address to send from? Try ini_set('sendmail_from', 'your@email.here')?

Posted: Wed Jul 25, 2007 9:29 pm
by shiyou
astions wrote:
The PHP Manual wrote: Note: If messages are not received, try using a LF (\n) only. Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.
You'll also want to ensure the return path is being set.
What do u mean "ensure the return path is being set"? Any example to this statement?

Posted: Wed Jul 25, 2007 9:33 pm
by shiyou
PHOENIXHEART wrote:Also, did you set the email address to send from? Try ini_set('sendmail_from', 'your@email.here')?
Where do i need to set this??

Posted: Wed Jul 25, 2007 9:48 pm
by superdezign
shiyou wrote:
PHOENIXHEART wrote:Also, did you set the email address to send from? Try ini_set('sendmail_from', 'your@email.here')?
Where do i need to set this??
Anywhere before you try to send a message.

This could all be avoided with an SMTP connection using Swiftmailer.