/    Sign up×
Community /Pin to ProfileBookmark

SMTP trouble

OK, i’m setting up a webform on someone elses server.

The form works perfectly on my server, however. The server i am testing on, does not allow relaying.

I get the following message…

[b]Warning:[/b] mail() [function.mail]: SMTP server response: 550 <[email protected]> is invalid. in D:Domainsmywebsite.netwwwrootceruleanmail.php on line 93

How do i get round this? Could someone please give me a step-by-step.

Many… MANY thanks in advance.

rapidz.

to post a comment
PHP

12 Comments(s)

Copy linkTweet thisAlerts:
@rapidzauthorJan 08.2007 — sorry i should have said.

What i want to be able to do, is only allow a certain email address to be able to send from the server.

is this possible?
Copy linkTweet thisAlerts:
@NogDogJan 09.2007 — I believe that means the "From:" email address being used to send the email is not recognized as a valid email address on your server.
Copy linkTweet thisAlerts:
@rapidzauthorJan 09.2007 — yup, i believe your correct. but how do i allow my server to accept the "from:" email?
Copy linkTweet thisAlerts:
@bathurst_guyJan 09.2007 — Use a valid email.
Copy linkTweet thisAlerts:
@NogDogJan 09.2007 — You can use a valid email on that server for the "From:" value, but then set the "Reply-To:" value to whatever you would like it to be.
Copy linkTweet thisAlerts:
@rapidzauthorJan 09.2007 — thankyou nogdog.

one more question, how would i code the reply to link?...

would it be like...

[code=php]
$reply = "[email protected]";

mail ($to,$subject,$body,$headers,$reply);
[/code]
Copy linkTweet thisAlerts:
@NogDogJan 09.2007 — It would be added to your $headers string. It might look something like:
[code=php]
$headers = "From: [email protected]";
$headers .= "Reply-To: $replyrn";
$headers .= "X-Mailer: PHP/".phpversion();
// send it:
mail($to, $subject, $body, $headers);
[/code]
Copy linkTweet thisAlerts:
@rapidzauthorJan 09.2007 — nogdog. thankyou very much for your help.

just out of interest, what does the last line of headers do? what is x-mailer?
Copy linkTweet thisAlerts:
@NogDogJan 09.2007 — nogdog. thankyou very much for your help.

just out of interest, what does the last line of headers do? what is x-mailer?[/QUOTE]

Not really my area of expertise. The [url=http://www.php.net/manual/en/function.mail.php]mail() web page[/url] uses it in their example, so I do, too. ?
Copy linkTweet thisAlerts:
@rapidzauthorJan 09.2007 — ok, it seems i'm now having trouble with some checkboxes.

if i don't tick a certain checkbox, the error message displayed is:

Notice: Undefined index: tick4 in D:Domainsxs2data.netwwwrootceruleansend.php on line 35

does anyone know what i'm doing wrong?
Copy linkTweet thisAlerts:
@NogDogJan 09.2007 — Checkbox element only appear in the $_POST or $_GET array if the box is checked, otherwise it's not set. Therefore, to avoid the notice, you need to refer to that element of the $_POST (or $_GET) array if it has actually been set:
[code=php]
$varname = (isset($_POST['tick4'])) ? $_POST['tick4'] : "";
[/code]

(Change the "" at the end of that line to whatever value you'd prefer to use if the checkbox is not checked.)
×

Success!

Help @rapidz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...