By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,118 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,118 IT Pros & Developers. It's quick & easy.

How to use mail( ) with out asked for "RECEIVE FIRST BEFORE SEND" Message

nallinattu
P: 11
When I use mail ( ) function correctly, I am prompted to "RECEIVE FIRST BEFORE SENDING " and hence I authenticate by receiving mail first by a mail client !!. Then mail ( ) works . How to make it work with out giving such prompt to me.I use the mail ( ) function correctly and it works , otherwise.

Example of what I used :-

<?php
mail("he_she_it@yahoo.com",
"How Are You, Pl. Offer Solution to",
"Will It Work with out telling me RECEIVE FIRST BEFORE SENDING", "From: "i_we_you@rediffmail.com"\r\nReturn-Path: "iweyou@rediffmail.com"\r\n");
?>
Jan 8 '07 #1
Share this Question
Share on Google+
7 Replies


ronverdonk
Expert 2.5K+
P: 4,258
You misplaced the double quotes areoung the from and reply-to: you don't need thrm. The carriage returns/newlines were tehrefore also not recognized. This works:[php]<?php
mail("he_she_it@yahoo.com",
"How Are You, Pl. Offer Solution to",
"Will It Work with out telling me RECEIVE FIRST BEFORE SENDING",
"From: i_we_you@rediffmail.com\r\nReturn-Path: iweyou@rediffmail.com\r\n");
?>[/php]
Ronald :cool:
Jan 8 '07 #2

nallinattu
P: 11
You misplaced the double quotes areoung the from and reply-to: you don't need thrm. The carriage returns/newlines were tehrefore also not recognized. This works:[php]<?php
mail("he_she_it@yahoo.com",
"How Are You, Pl. Offer Solution to",
"Will It Work with out telling me RECEIVE FIRST BEFORE SENDING",
"From: i_we_you@rediffmail.com\r\nReturn-Path: iweyou@rediffmail.com\r\n");
?>[/php]
Ronald :cool:
O Lo ! It did not work again. I got message below , but when I started E mail client and made it authenticate outside PHP , the mail ( ) worked ! Strange !!

The error I got was :-
Warning: mail() [function.mail]: SMTP server response: 553 sorry, Authentication failed or timed out. Please do get messages first to authenticate yourself.(#4.4.3) in C:\Documents and Settings\sam\Desktop\LOCAL SERVER\again\nattumail.php on line 5
PHP Warning: mail() [function.mail]: SMTP server response: 553 sorry, Authentication failed or timed out. Please do get messages first to authenticate yourself.(#4.4.3) in C:\Documents and Settings\sam\Desktop\LOCAL SERVER\again\nattumail.php on line 5
Jan 8 '07 #3

ronverdonk
Expert 2.5K+
P: 4,258
Must be a problem with your definitions here. Please show the relevant php.ini definitions so we can see if anything is wrong there.

Ronald :cool:
Jan 8 '07 #4

nallinattu
P: 11
Must be a problem with your definitions here. Please show the relevant php.ini definitions so we can see if anything is wrong there.

Ronald :cool:
Here are the lines:-

[mail function]
; For Win32 only.
SMTP = f3smtp.rediffmail.com
smtp_port = 25

But tell me with all suspected errors, how can it work when authenticated by E mail client running outside of PHP !!
Jan 8 '07 #5

ronverdonk
Expert 2.5K+
P: 4,258
What is your
Expand|Select|Wrap|Line Numbers
  1. ; For Win32 only.
  2. sendmail_from = userid@thatsite.com 
definition?

Ronald :cool:
Jan 8 '07 #6

nallinattu
P: 11
What is your
Expand|Select|Wrap|Line Numbers
  1. ; For Win32 only.
  2. sendmail_from = userid@thatsite.com 
definition?

Ronald :cool:
Hello ! The answer is very brief , I am unable to make out what U want me to do ? Shd I creatre an extra line , then where to put the authentication password in php.ini ?
Jan 9 '07 #7

ronverdonk
Expert 2.5K+
P: 4,258
I was referring to another mandatory definition in php.ini. When you have not done that, I suggest that you fill that in with your email address and see if that gets things going. I think it is better to define things in php.ini properly, so you don't run into an unexpected non-documented error because a definition is missing.

Ronald :cool:
Jan 9 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.