PHP-Mail server issue

Hi friends


I am using   mail function  in php to send mail.

when i send the  mail to  yahoo id or gmail id its working fine. But i try to send  third party mail server  , mail can not  be send the third party mail id example (xxxxx@anwssi.com) ,  How its possibe? How can i solve this issue.

Please help me

ETES
ephrontechAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
pjedmondConnect With a Mentor Commented:
Another cause of this is that you may need to 'POP' before SMTP. This means that you must have logged in and authenticated with the same server via POP within a period of say 10 minutes prior to trying to send an email:

http://pages.prodigy.net/michael_santovec/pop3telnet.htm

This ensures that only authenticated users can use the SMTP server concerned.

(   (()
(`-' _\
 ''  ''

0
 
pjedmondCommented:
Well that's your problem - If sent by mail function in php, many mail providers will treat the mail as spam as the mail will be labelled as an 'automatically mailed' email from a script if you look carefully at the header. You need to get your recipients to 'white list' the address that the email comes from.

AOL will probably treat your email as junk. Many filters will deliver the email, *provided* that there are additional headers in place:

<?php
$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
   'Reply-To: webmaster@example.com' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

However, unless the server (with the php script on it) that is sending the email has a fixed ip, with the correct registered DNS and reverse DNS configured many addresses will still reject your email. AOL being a typical example.

Unfortunately - a sign of the times:(

(   (()
(`-' _\
 ''  ''
0
 
pjedmondCommented:
Alternatively, configure your php script to send mail cia a properly registered email server, or you can try and make the email look moer 'authentic':

$boundary = md5(uniqid(time()));

$headers  = 'From: ' . $from . "\n";
$headers .= 'To: ' . $to . "\n";
$headers .= 'Return-Path: ' . $from . "\n";
$headers .= 'MIME-Version: 1.0' ."\n";
$headers .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '"' . "\n\n";
$headers .= $body_simple . "\n";
$headers .= '--' . $boundary . "\n";
$headers .= 'Content-Type: text/plain; charset=ISO-8859-1' ."\n";
$headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n";
$headers .= $body_plain . "\n";
$headers .= '--' . $boundary . "\n";
$headers .= 'Content-Type: text/HTML; charset=ISO-8859-1' ."\n";
$headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n";
$headers .= $body_html . "\n";
$headers .= '--' . $boundary . "--\n";

$mailOk=mail('', $subject,'', $headers);

(   (()
(`-' _\
 ''  ''
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
ephrontechAuthor Commented:
Thanks for your replay

Still getting the same problem.In your coding i tried to send mail xxxx@anwssi.com  and check the mail server  i am not receive any message . But i change the "To"  address gmail account Its working fine .
How its possible ?

Please help me.

Thanks
ETES
0
 
pjedmondCommented:
Depends on the mail server and it's spam filter.

Try and check whether you can send using telnet:

http://www.yuki-onna.co.uk/email/smtp.html

and see what works, and what doesn't. When you find a combination that works, then you need to ensure that you 'duplicate' it in php. Bear in mind that emails sent from the server that you are using may *never* be accepted by xxxx@anwssi.com, however, you will hopefully get a more useful error message usign the telnet approach.

(   (()
(`-' _\
 ''  ''
0
 
ephrontechAuthor Commented:


I got "550 Administrative prohibition"     message .How to solve this issue ?  Please help me

Thanks
ETES
0
 
pjedmondCommented:
Which means that the server concerned does not allow you to send emails directly to it. This can be for a number of reasons....including the fact that the email address may be over quota. Contac user and tell them to check their account?

As an aside for future Qs, it would help me and others to give you better input if you phrased your questions better. "
I got "550 Administrative prohibition"     message " is useful, but if you said:

I did 1, then 2, then 3 getting these responses, and when I did 4, I got a "550 Administrative prohibition" message . Here is the cut and paste of th process (obviously *** out anything sensitive):

------8X---------
1
adfa
2
zdfcsf
3
zadfasdf
4
asdadf
550 Administrative prohibition
------8X---------

then you'd get better answers, and more people are likely to be able to assist.

(   (()
(`-' _\
 ''  ''
0
 
ephrontechAuthor Commented:
I did

telnet mail.domain.com 25
Trying 66.xx.18.6...
Connected to rose.domain.com (66.xx.18.6).
Escape character is '^]'.
220-rose.domain.com ESMTP Exim 4.52 #1 Fri, 30 Jun 2006 06:21:29 -0500
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
HELO local.domain.name
250 rose.domain.com Hello local.domain.name [66.xx.18.6]
MAIL FROM:prabhu@xxxxx.com
250 OK
RCPT TO:members@xxxxxx.com
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
Subject:-testttt-

hello members@xxxxxxx.com from prabhu@xxxxxx.com
.
550 Administrative prohibition


I got this error messsge ,Any idea ,please help me

Thanks
ETES
0
 
pjedmondCommented:
Much better Q;)

Looks like their mailbox is over quota, or the person concerned has a 'spam' filter (or other configuration of the individual account concerned) rejecting the email. Also possible that the email concerned does not exist.

(   (()
(`-' _\
 ''  ''
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.