Jump to content

adding name to sender


MSUK1

Recommended Posts

in my php mail i use this code:

$success = mail($EmailFrom, $Subject, $Body2, "From: <$EmailTo>");

 

and here are the variables for emial from and email to,

$EmailFrom = Trim(stripslashes($_POST['email'])); 
$EmailTo = "[email protected]";

 

when the email is received the sender just appears as [email protected] how can i have it say MSUKGroup Auto Responder or something? instead of just repeat the address?

Link to comment
https://forums.phpfreaks.com/topic/217897-adding-name-to-sender/
Share on other sites

ok so started to use HTML emails, how can i now add php variables into that email ive tried this not working? done some research on google firsts too, tried another metod of using " . $var . " but no luck?

$message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MSUKGroup</title>
</head>

<body>

<table style="width: 100%" cellspacing="0" cellpadding="0">
			<!-- MSTableType="layout" -->
			<tr>
							<td valign="top">
							<table style="width: 500px" cellspacing="0" cellpadding="0">
											<!-- MSTableType="layout" -->
											<tr>
															<td valign="top">
															<img src="http://www.msukgroup.co/img/logos/orange.png" width="323" height="42" /></td>
											</tr>
											<tr>
															<td valign="top" style="margin-top:2px" class="maincontent">
															<p>Dear {$name} ,</p>
															<p> </p>
															<p>Thankyou for 
															contacting us 
															via our online 
															form, we have 
															collected the 
															following from 
															your query:</p>
															<ul>
																			<li>name:<br />{$name}
																			</li>
																			<li>email:<br />$email}																				</li>
																			<li>website:<br />$web}																			</li>
																			<li>tel:<br />{$tel}																				</li>
																			<li>subject:<br />{$sub}																			</li>
																			<li>message:<br />{$message}																		</li>
															</ul>
															<p>If their is 
															anything else we 
															can assist you 
															with please call 
															us, our number 
															can be found on 
															our website at
															<a href="http://www.msukgroup.co">
															<span class="footer2">
															http://www.msukgroup.co</span></a>
															</p>
															<p> </p>
															<p>  </p>
															</td>
											</tr>
											<tr>
															<td class="footer1" valign="top">
															 </td>
											</tr>
							</table>
							</td>
			</tr>
</table>

							</body>

</html>
';

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.