Mail Function Error Results On Gmail

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 4
Joined: Tue Dec 04, 2012 8:38 pm

Mail Function Error Results On Gmail

Postby ImanLlusion » Tue Feb 19, 2013 11:18 pm

I have a source code function mail like this :

$emailTo = $_POST['email_tujuan'];
$subject = $_POST['title'];
$body = "
Dear ".$_POST['nama'].",

Judul :


Link :

Pesan :
$headers = 'From: '.$_POST['nama'].' <'.$_POST['email_anda'].'>' . "\r\n" . 'Reply-To: ' . $_POST['email_anda'];
mail($emailTo, $subject, $body, $headers);

and then sent the results like this:

Dear Iman Llusion,

[object HTMLInputElement]

[object HTMLInputElement]


But why could appear [object HTMLInputElement], [object HTMLInputElement]?
What was wrong? Anybody help me a beginner's... ^ _ ^

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: Mail Function Error Results On Gmail

Postby seandisanti » Mon Feb 25, 2013 2:00 pm

where is it returning that? it looks like you're converting a value to an object at some point, and then trying to use it as a string. look for a 'new' string that may have gotten dropped into the wrong place. also, you can check your values by adding

Code: Select all

echo '<pre>';

at the top of your script. that way you'll see everything contained in each element of the post, and that will help you spot objects or values that don't belong

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 5 guests