PHP mail formating
Moderator: General Moderators
PHP mail formating
All,
I want the message below to be email with a line feed something like this.
Name:
Problem with :
Problem :
Currently in the mail everything is getting displayed in 1 line together.
Can some one help.
{
$to = 'sriram.s@db.com';
$subject = 'Problem with '. $sysname ;
$message = 'Name :'. $name . ' Problem with :' . $sysname .' Problem Details :' . $problem . ' Phone Num :' . $phnum;
$headers = 'From: sriram_s_98@yahoo.com';
mail($to, $subject, $message, $headers);
I want the message below to be email with a line feed something like this.
Name:
Problem with :
Problem :
Currently in the mail everything is getting displayed in 1 line together.
Can some one help.
{
$to = 'sriram.s@db.com';
$subject = 'Problem with '. $sysname ;
$message = 'Name :'. $name . ' Problem with :' . $sysname .' Problem Details :' . $problem . ' Phone Num :' . $phnum;
$headers = 'From: sriram_s_98@yahoo.com';
mail($to, $subject, $message, $headers);
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am
-
shailendra
- Forum Newbie
- Posts: 13
- Joined: Mon Jun 20, 2005 12:20 am
- Location: INDIA
- Contact:
HI,
Try the following code, add <br> in your code;
<?
$to = 'sriram.s@db.com';
$subject = 'Problem with '. $sysname;
$message = 'Name :'. $name . '<br><br> Problem with :' . $sysname .'<br><br> Problem Details :' . $problem . '<br><br> Phone Num :' . $phnum;
$headers = 'From: sriram_s_98@yahoo.com';
mail($to, $subject, $message, $headers);
?>
Thanks
Shailendra
Try the following code, add <br> in your code;
<?
$to = 'sriram.s@db.com';
$subject = 'Problem with '. $sysname;
$message = 'Name :'. $name . '<br><br> Problem with :' . $sysname .'<br><br> Problem Details :' . $problem . '<br><br> Phone Num :' . $phnum;
$headers = 'From: sriram_s_98@yahoo.com';
mail($to, $subject, $message, $headers);
?>
Thanks
Shailendra
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am
{
$to = 'sriram.s@db.com';
$subject = 'Problem with '. $sysname ;
$message = 'Name :'. $name .
break;
' Problem with :' . $sysname .
break;
' Problem Details :' . $problem .
break;
' Phone Num :' . $phnum;
$headers = 'From: sriram_s_98@yahoo.com';
mail($to, $subject, $message, $headers);
i think that is how you would do it
p.s. this is my 200th post
$to = 'sriram.s@db.com';
$subject = 'Problem with '. $sysname ;
$message = 'Name :'. $name .
break;
' Problem with :' . $sysname .
break;
' Problem Details :' . $problem .
break;
' Phone Num :' . $phnum;
$headers = 'From: sriram_s_98@yahoo.com';
mail($to, $subject, $message, $headers);
i think that is how you would do it
p.s. this is my 200th post
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am
-
shailendra
- Forum Newbie
- Posts: 13
- Joined: Mon Jun 20, 2005 12:20 am
- Location: INDIA
- Contact:
-
shailendra
- Forum Newbie
- Posts: 13
- Joined: Mon Jun 20, 2005 12:20 am
- Location: INDIA
- Contact:
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am