Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

Wwwwxxx reemine, WWWXXX.VCBA, WWWXXX.VCBA, TheboL.wwwxxxxx, WWWXXXAPC , wwwxxn.xsss, wwwxxxapc, WWWXXX.VCBA, wwwxxx vba, wwwxxxdoco



#1: Re: PHP Email Question

Posted on 2010-10-01 00:37:40 by Ravi Menon

On Wed, Sep 29, 2010 at 1:37 PM, Joe Jackson <> wro=
> Hi
> I am trying the following snippet as Bostjan=A0 suggested, and an email i=
> getting sent when I submit the form however in the body of the email I am
> getting none of the form data in the body of the email.=A0 All I am getti=
ng is
> the letter 'z' ?=A0 Also in the from field of the email this is showing a=
s my
> email address and not the email address of the user who has sent the form
> Any ideas on where I am going wrong with this snippet?=A0 Any advice woul=
d be
> much appreciated
> $msgContent =3D "Name: ". $values['name'] ."\n";
> $msgContent .=3D "Address: ". $values['address'] ."\n";
> $msgContent .=3D "Telephone: ". $values['telephone'] ."\n";
> $msgContent .=3D "Email Address: ". $values['emailaddress'] ."\n";
> $msgContent .=3D "Message: ". $values['message'] ."\n";
> function ProcessForm($values)
> {
>   =A0 mail('', 'Website Enquiry', $msgContent, "Fro=
> \"{$values['name']}\" <{$values['emailaddress']}>");
>      // Replace with actual page or redirect :P
>   =A0 echo "<html><head><title>Thank you!</title></head><body>Thank
> you!</body></html>";

Not sure if it it is a typo above, are you actually passing
$msgContent in the function above? If it is a global variable, you
would need to add a 'global' declaration:

function ProcessForm($values)
global $msgContent;

mail('', 'Website Enquiry', $msgContent, "From:
\"{$values['name']}\" <{$values['emailaddress']}>\r\n");

Also try adding CRLF sequence at the end of the header line as shown above.


PHP General Mailing List (
To unsubscribe, visit:

Report this message

#2: Re: PHP Email Question

Posted on 2010-10-01 17:06:19 by kranthi

I cant see why you are getting the letter 'z' (assuming $msgContent
was referenced properly) . Complete code will be helpful to debug the

Also, Heredoc syntax will be more helpful in your situation. And usage
of global keyword is strongly discouraged in favor of $GLOBALS
superglobal array


PHP General Mailing List (
To unsubscribe, visit:

Report this message