RE: I have a problem to add a new line to the body of my email when I am using '<a href="mailto: ...>" function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I have a problem to add a new line to the body of my email when I am
using
> '<a href="mailto: ...>" function.
> 
> This is my code:
> 
> $details[email] //email of the user from the form
> $details[contact_name] //name of the user from the form
> 
> $email_subject = "subject text...";
> 
> $email_form = "Welcome ".$details[contact_name].",%0D%0A%0D%0A";
> $email_form .= "Thank you for registering with ....";
> 
> <a
>
href='mailto:".$details[email]."?Body=".$email_form."&Subject=".$email_s
ub
> je
> ct."' class='darkblue'>Send the email</a>

Use \n. 

email_form = "Welcome ".$details[contact_name].",\n\n";

Are you sure "body" is even supported? I'll guarantee it's not going to
be for every browser/email client. 

From: http://www.w3.org/TR/WD-html40-970917/htmlweb.html#h-5.1.3.1
--------------------------------------
MAILTO URLs have the following syntax:

mailto:email-address

User agents may support MAILTO URL extensions that are not yet Internet
standards (e.g., appending subject information to a URL with the syntax
"?Subject=my%20subject" where any space characters are replaced by
"%20"). Some user agents also support "?Cc=email-address".
--------------------------------------

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux