Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Send mail and then redirect?

LEGEND ,
Aug 03, 2006 Aug 03, 2006
Isn't this the correct way to do that?

mail($to,$subject,$message,$additionalHeaders);
$mailSent=1;
}
header("Location: http://www.example.com");

Am I getting the 'headers already sent' message because of the additional
headers thing?


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================



TOPICS
Server side applications
379
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 03, 2006 Aug 03, 2006
These are the errors I am getting -

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to
relay for xxx@example.com in W:\Webspace\resadmin\xxxxxx.com\www\process.php
on line 75


Warning: Cannot modify header information - headers already sent by (output
started at W:\Webspace\resadmin\xxxxxxxx.com\www\process.php:75) in
W:\Webspace\resadmin\xxxxxxx.com\www\process.php on line 78



Line 75 is the one previously shown with mail($To...

Line 78 is the one with the header("Location:....


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:easr20$8r3$1@forums.macromedia.com...
> Isn't this the correct way to do that?
>
> mail($to,$subject,$message,$additionalHeaders);
> $mailSent=1;
> }
> header("Location: http://www.example.com");
>
> Am I getting the 'headers already sent' message because of the additional
> headers thing?
>
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 03, 2006 Aug 03, 2006
Murray *ACE* wrote:
> These are the errors I am getting -
>
> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to
> relay for xxx@example.com in W:\Webspace\resadmin\xxxxxx.com\www\process.php
> on line 75

It's not a PHP problem, but the response coming from the Windows SMTP
server, which is telling you that relaying is not allowed:

http://support.microsoft.com/kb/304897/

> Warning: Cannot modify header information - headers already sent by (output
> started at W:\Webspace\resadmin\xxxxxxxx.com\www\process.php:75) in
> W:\Webspace\resadmin\xxxxxxx.com\www\process.php on line 78

The response from the Windows server sends output to the browser,
therefore the PHP header() function cannot redirect the page. The
problem lies with the setup of the Windows server. You need to contact
the host to find out if PHP mail is being blocked, and what you need to
do to overcome the problem.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 03, 2006 Aug 03, 2006
LATEST
Thank you, David. Doing that exact thing!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"David Powers" <david@example.com> wrote in message
news:eat0dp$fa5$1@forums.macromedia.com...
> Murray *ACE* wrote:
>> These are the errors I am getting -
>>
>> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable
>> to relay for xxx@example.com in
>> W:\Webspace\resadmin\xxxxxx.com\www\process.php on line 75
>
> It's not a PHP problem, but the response coming from the Windows SMTP
> server, which is telling you that relaying is not allowed:
>
> http://support.microsoft.com/kb/304897/
>
>> Warning: Cannot modify header information - headers already sent by
>> (output started at W:\Webspace\resadmin\xxxxxxxx.com\www\process.php:75)
>> in W:\Webspace\resadmin\xxxxxxx.com\www\process.php on line 78
>
> The response from the Windows server sends output to the browser,
> therefore the PHP header() function cannot redirect the page. The problem
> lies with the setup of the Windows server. You need to contact the host to
> find out if PHP mail is being blocked, and what you need to do to overcome
> the problem.
>
> --
> David Powers
> Adobe Community Expert
> Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
> http://foundationphp.com/


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines