Form mail() problem

Form mail() problem

am 10.12.2007 07:05:28 von Tim Daff

--Apple-Mail-12--83803023
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit

I am just beginning with php, my first effort was a quote detail form
that collects the user inputted data and makes and email out of it,
which sends to my boss. It worked fine for about 3 months now all of
a sudden it has stopped, and made my boss angry.

Any help I could get with this would be greatly appreciated.


Here is the error code I am getting:

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
Unable to relay for paul@lu.com.au in C:\Domains\logosunlimited.com.au
\wwwroot\contact\processquote3.php on line 284

Here is the .php code:


$name=$HTTP_POST_VARS['name'];
$email=$HTTP_POST_VARS['email'];
$phone=$HTTP_POST_VARS['phone'];
$catalog=$HTTP_POST_VARS['catalog'];
$notes=$HTTP_POST_VARS['notes'];
$code=$HTTP_POST_VARS['code'];
$qty=$HTTP_POST_VARS['qty'];
$company=$HTTP_POST_VARS['company'];
$postal=$HTTP_POST_VARS['postal'];
$screen=$HTTP_POST_VARS['screen'];
$customdetails=$HTTP_POST_VARS['customdetails'];
$embroidery=$HTTP_POST_VARS['embroidery'];

// multiple recipients
$to .= 'paul@lu.com.au';

// subject
$subject = 'Online Quote';

// message
$message = '



Logos Unlimited | Contact




cellspacing="0" id="tableLayout">











New Quote


Customer Details


Name: '.$name.'

Company: '.$company.'

Phone: '.$phone.'

eMail: '.$email.'

Postal Address:



'.$postal.'


Quote Details


Catalog: '.$catalog.'

Product Code: '.$code.'

Quantity: '.$qty.'


Printing:

'.$screen.'

'.$customdetails.'


Embroidery:

'.$embroidery.'


Notes:


'.$notes.'









';

// 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 .= 'To: paul@lu.com.au' . "\r\n";
$headers .= 'From: noreply@logosunlimited.com.au' . "\r\n";

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




Logos Unlimited | Contact





cellspacing="0" id="tableLayout">

















src="../images/header_test.gif" width="800" height="108" />
home
printing promotional signage contact

Quote Request Sent


Thank you, your quote request has been sent. We will get back
to you with pricing asap.

If you have any other enquirys please email us here: info@lu.com.au



home | clothing | embroidery | printing | promotional | signage | contact

Logos Unlimited, 17-19 The Concourse, Cowes, 3922

Phone: 03 5952 5477 Fax: class="bold">03 5952 1670 email: href="mailto:sales@lu.com.au">sales@lu.com.au






--Apple-Mail-12--83803023--

RE: Form mail() problem

am 10.12.2007 07:41:30 von Gary Wardell

Hi,

This is an SMTP error, not a PHP error. Since you imply the PHP code hasn't changed then something else must have changed.

First verify that the to address, paul@lu.com.aum is still good buy sending and e-mail to it.

If that checks out OK, than check with the mail server administrator. He may have tightened the SPAM controls by requiring SMTP
clients, like PHP, to authenticate before sending mail that relays. Or perhaps the authentication credentials in place may have
changed. Also, some mail server will allow relaying based on IP address. If the mail server does that perhaps the IP address of
the web server has changed. Either way, whatever authentication is used may need to be looked at and corrected.

I can't think of anything else that might be the problem.

Gary


> -----Original Message-----
> From: Tim Daff [mailto:timdaff@gmail.com]
> Sent: Mon, December 10, 2007 1:05 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Form mail() problem
>
>
> I am just beginning with php, my first effort was a quote
> detail form
> that collects the user inputted data and makes and email out of it,
> which sends to my boss. It worked fine for about 3 months
> now all of
> a sudden it has stopped, and made my boss angry.
>
> Any help I could get with this would be greatly appreciated.
>
>
> Here is the error code I am getting:
>
> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
> Unable to relay for paul@lu.com.au in
> C:\Domains\logosunlimited.com.au
> \wwwroot\contact\processquote3.php on line 284
>
> Here is the .php code:
>
> >
> $name=$HTTP_POST_VARS['name'];
> $email=$HTTP_POST_VARS['email'];
> $phone=$HTTP_POST_VARS['phone'];
> $catalog=$HTTP_POST_VARS['catalog'];
> $notes=$HTTP_POST_VARS['notes'];
> $code=$HTTP_POST_VARS['code'];
> $qty=$HTTP_POST_VARS['qty'];
> $company=$HTTP_POST_VARS['company'];
> $postal=$HTTP_POST_VARS['postal'];
> $screen=$HTTP_POST_VARS['screen'];
> $customdetails=$HTTP_POST_VARS['customdetails'];
> $embroidery=$HTTP_POST_VARS['embroidery'];
>
> // multiple recipients
> $to .= 'paul@lu.com.au';
>
> // subject
> $subject = 'Online Quote';
>
> // message
> $message = '
>
>
>
> Logos Unlimited | Contact
>
>
>
>
>

> cellspacing="0" id="tableLayout">
>
>
>
>
>
>
>
>
>
>
>
> id="tdHeader"> > src="http://i187.photobucket.com/albums/x53/pblkdistribution /h
> eader_test.gif
> " width="800" height="108" />

>

New Quote


>

Customer Details


>

Name: '.$name.'

> Company: '.$company.'

> Phone: '.$phone.'

> eMail: '.$email.'

> Postal Address:

>

> '.$postal.'


>

Quote Details


>

Catalog: '.$catalog.'

> Product Code: '.$code.'

> Quantity: '.$qty.'

>


>

Printing:

> '.$screen.'

> '.$customdetails.'


>

Embroidery:

> '.$embroidery.'


>

Notes:


>

'.$notes.'

>

>

>


>
>
>
> ';
>
> // 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 .= 'To: paul@lu.com.au' . "\r\n";
> $headers .= 'From: noreply@logosunlimited.com.au' . "\r\n";
>
> // Mail it
> mail($to, $subject, $message, $headers);
> ?>
>
>
>
>
> Logos Unlimited | Contact
>
>
>
>
>
> > cellspacing="0" id="tableLayout">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> src="../images/header_test.gif" width="800" height="108" />
home > href="../clothing/clothing.html">clothing
> printing promotional signage contact

>

Quote Request Sent


>

Thank you, your quote request has been sent. We will
> get back
> to you with pricing asap.

> If you have any other enquirys please email us here: > href="mailto:info@lu.com.au
> ">info@lu.com.au

> src="../images/
> delivery.gif" width="180" height="24" border="0" />

> home | > href="file:///Macintosh
> HD/Users/DF/Sites/Logos Unlimited Website/Logos Root
> Folder/wwwroot/
> clothing/clothing.html">clothing | embroidery | printing | > href="file:///Macintosh
> HD/Users/DF/Sites/Logos Unlimited Website/Logos Root
> Folder/wwwroot/
> promotional.html">promotional | signage | contact

> Logos Unlimited, 17-19 The Concourse, Cowes, 3922

> Phone: 03 5952 5477 Fax: > class="bold">03 5952 1670 email: > href="mailto:sales@lu.com.au">sales@lu.com.au

>


>
>
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Form mail() problem

am 10.12.2007 07:54:27 von dmagick

Tim Daff wrote:
> I am just beginning with php, my first effort was a quote detail form
> that collects the user inputted data and makes and email out of it,
> which sends to my boss. It worked fine for about 3 months now all of a
> sudden it has stopped, and made my boss angry.

Tell him to chill out ;)

> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable
> to relay for paul@lu.com.au in
> C:\Domains\logosunlimited.com.au\wwwroot\contact\processquot e3.php on
> line 284

logosunlimited.com.au probably stopped their server from being an
open-relay.

You probably won't be able to send to an email address outside of their
domain name without using smtp authentication.

Check out phpmailer for a really easy way to do it.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Form mail() problem

am 10.12.2007 16:54:44 von parasane

On Dec 10, 2007 1:05 AM, Tim Daff wrote:
[snip!]
> Here is the error code I am getting:
>
> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
> Unable to relay for paul@lu.com.au in C:\Domains\logosunlimited.com.au
> \wwwroot\contact\processquote3.php on line 284
[snip!]

To me, this says that your code is probably still fine, but that
the server on which the logosunlimited.com.au domain is hosted may not
realize that the domain lu.com.au (presuming the `lu` stands for
`logosunlimited`, and is another of your domain names) is a local
domain, if it is.

I'm not exactly certain how you'd handle that with Exchange
(you're using Windows, so I ignorantly assume you're using Exchange),
but in Linux, using Exim, Qmail, or a similar system, you'd need to
modify /etc/localdomains.

Either way, it looks like it's not a PHP issue, which might get
you off the hook with your boss.... but have your server/network admin
take a look at why lu.com.au isn't on the permissible relay list.

--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Form mail() problem

am 10.12.2007 17:34:20 von Dee Ayy

Normally I'd say, "If it's been working fine for 3 months; then just
stopped working; don't get angry at the PHP programmer; check with the
network admin as to what changed."

But it's interesting that your error came from an MS Windows machine,
while you have links at the bottom from an Apple machine. Did someone
move your working code from one machine to another?

> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
> Unable to relay for paul@lu.com.au in C:\Domains\logosunlimited.com.au
> \wwwroot\contact\processquote3.php on line 284


> home | clothing | embroidery | printing | promotional | signage | contact


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Form mail() problem

am 11.12.2007 00:39:43 von Tim Daff

I designed the site and did all coding, and uploaded from OS X. But
the mac stops there, our work server is Windows, and the server
hosting our sites is I think Windows.


On 11/12/2007, at 3:34 AM, Dee Ayy wrote:

> Normally I'd say, "If it's been working fine for 3 months; then just
> stopped working; don't get angry at the PHP programmer; check with the
> network admin as to what changed."
>
> But it's interesting that your error came from an MS Windows machine,
> while you have links at the bottom from an Apple machine. Did someone
> move your working code from one machine to another?
>
>> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
>> Unable to relay for paul@lu.com.au in C:\Domains
>> \logosunlimited.com.au
>> \wwwroot\contact\processquote3.php on line 284
>
>
>> home | clothing | embroidery | printing | promotional | signage | contact

>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php