Jump to content


Photo

Mail() problem


  • Please log in to reply
6 replies to this topic

#1 Drezard

Drezard
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts

Posted 10 September 2006 - 10:43 AM

Whats wrong with this function?

mail("$email1" "@" "$email2", "Sellyourownhome.com.au activate your account", "Welcome to Sell your own home The easiest and cheapest way to sell your own home" <br> <br> <a href="localhost/activate.php"> <br> <br> "Thanks", "From: Help@sellyourownhome.com.au");

Cheers, Daniel

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 September 2006 - 10:45 AM

you tell me what wrong my golden ball has run out of power sorry.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 Drezard

Drezard
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts

Posted 10 September 2006 - 10:57 AM

If you mean the error here it is:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Program Files\xampp\htdocs\newuser.php on line 63


Thanks, Daniel

#4 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 10 September 2006 - 10:59 AM

Make it

$to= "$email1@$email2";
mail($to, ...................

RTFM is an almost extinct art form, it should be subsidized.

#5 Drezard

Drezard
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts

Posted 10 September 2006 - 11:19 AM

Now the $message part (3rd parameter) wont work. Whats wrong in it?

		$to = "$email1@$email2";
	$subject = "Sellyourownhome.com.au activate your account";
		$message = "Welcome to Sell your own home The easiest and cheapest way to sell your own home <br> <br> <a href="localhost/activate.php"> <br> <br> Thanks";
	$headers = "From: Help@sellyourownhome.com.au";
	mail($to, $subject, $message, $headers);

- Cheers, Daniel

#6 alpine

alpine
  • Members
  • PipPipPip
  • Advanced Member
  • 756 posts
  • LocationNorway

Posted 10 September 2006 - 11:23 AM

You must escape double quotes if used within double quotes,

$message = "Welcome to Sell your own home The easiest and cheapest way to sell your own home <br> <br> <a href=\"localhost/activate.php\"> <br> <br> Thanks";

#7 ahmed17

ahmed17
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 10 September 2006 - 11:57 AM

<?php
// email address here
$to= "email@example.com";
// The subject
$subject = "Enter your subject here";
// The message
$message = "Enter your message here";
$from="your_email_here@test.com";
mail($to, $subject, $message, "From: $from");
?>

  you can do test to ensure data is sent (using if )




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users