S
Steve Audus, Chaucer BEC, Sheffield UK
How do I alter the follow asp code so the from field produces the a friendly
address
"Name <[email protected]>"
Code is presently used.
<%
If Request.Form("btnSend").Count > 0 Then
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = Request.Form("subject")
objMessage.Sender = Request.Form("From")
objMessage.To = Request.Form("To")
objMessage.TextBody = Request.Form("message")
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mailserver"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Response.Redirect("../thanks.htm")
End If
%>
<form action="contact.asp" method="post" name="sendEmail" class="content">
<input type="hidden" name="subject" value="Enquiry from Web Site">
<input type="hidden" name="to"
value="(e-mail address removed)"/>
<table align="center" cellpadding="5" bordercolor="#000000"
class="content">
<tr>
<td>Your Email Address</td>
<td><input name="From" type="text" class="content" size="53"
/></td>
</tr>
<tr>
<td valign="top"><div align="right">Your Message</div></td>
<td><textarea name="message" cols="50" rows="6"
wrap="VIRTUAL" class="content"></textarea>
</td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="Send" type="submit" />
</div></td>
</tr>
</table>
<div align="center"></div>
<div align="center"></div>
</form>
Thank you any help.
Steve
address
"Name <[email protected]>"
Code is presently used.
<%
If Request.Form("btnSend").Count > 0 Then
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = Request.Form("subject")
objMessage.Sender = Request.Form("From")
objMessage.To = Request.Form("To")
objMessage.TextBody = Request.Form("message")
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mailserver"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Response.Redirect("../thanks.htm")
End If
%>
<form action="contact.asp" method="post" name="sendEmail" class="content">
<input type="hidden" name="subject" value="Enquiry from Web Site">
<input type="hidden" name="to"
value="(e-mail address removed)"/>
<table align="center" cellpadding="5" bordercolor="#000000"
class="content">
<tr>
<td>Your Email Address</td>
<td><input name="From" type="text" class="content" size="53"
/></td>
</tr>
<tr>
<td valign="top"><div align="right">Your Message</div></td>
<td><textarea name="message" cols="50" rows="6"
wrap="VIRTUAL" class="content"></textarea>
</td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="Send" type="submit" />
</div></td>
</tr>
</table>
<div align="center"></div>
<div align="center"></div>
</form>
Thank you any help.
Steve