Ecco tutto quello ke serve...aiutamiiiii !!!
Queste 2 variabili le ho create alcune pagine prima di raggiungere questa della creazione mail e sono quelle ke dovrebbero apparire nel corpo:
session("nome") = request.Form("nome")
session("cognome") = request.Form("cognome")
ecco il codice della pagina che crea la mail con aspmail:
const filename = "D:\Home\www.prostampasud.it\ftproot\wwwroot\email.asp" 'percorso da inserire a seconda di dove si trova il file
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(filename, 1, false)
corpo = a.ReadAll
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.ContentType = "text/html"
Mailer.FromName = "Stefano"
Mailer.FromAddress= "stex@ciao.it"
Mailer.RemoteHost = "relay.fasthosting.it"
Mailer.AddRecipient "Max Sgarra", "massimiliano@nuevacom.it"
Mailer.Subject = "Richiesta Preventivo ProstampaSud"
Mailer.BodyText = corpo
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
e questa è la pagina email.asp che vorrei fosse il corpo della mail:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!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=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.testo {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="http://stage.prostam.fasthosting.it/images/header-email.gif" alt="Prostampa Sud - richiesta preventivo" width="600" height="75" /></td>
</tr>
<tr>
<td align="center" bgcolor="#DCDCDC"><table width="570" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="50%"> </td>
<td width="50%"> </td>
</tr>
<tr>
<td width="50%" align="left" bgcolor="#F0F0F0" class="testo">nome: <%=session("nome")%></td>
<td width="50%" align="left" bgcolor="#F0F0F0" class="testo">cognome:<%=session("cognome")%></td>
</tr>
</table>
</body>
</html>