Jump to content

Mail() problem


Drezard

Recommended Posts

Whats wrong with this function?

[CODE]
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");
[/CODE]

Cheers, Daniel
Link to comment
Share on other sites

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

[CODE]
$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);
[/CODE]

- Cheers, Daniel
Link to comment
Share on other sites

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=[b][color=red]\[/color][/b]"localhost/activate.php[b][color=red]\[/color][/b]"> <br> <br> Thanks";
Link to comment
Share on other sites

[code]<?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");
?>[/code]

  you can do test to ensure data is sent (using if )
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.