1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
|
<html>
<head>
<title>
Mail
</title>
<style>
body {
padding: 0 0;
background: #192d40 url('../images/bg[1].jpg') repeat-x;
font-family: "arial",sans-serif;
font-size: 13px;
line-height:24px;
}
</style>
<script type="text/javascript">
function effacer(formulaire)
{
for (var i=0; i<formulaire.length; i++)
{
if (formulaire.elements[i].type=="radio" || formulaire.elements[i].type=="checkbox")
{
formulaire.elements[i].checked=false;
}
else if (formulaire.elements[i].type=="select-one")
{
formulaire.elements[i].options[0].selected=true;
}
else if (!(formulaire.elements[i].type=='reset' || formulaire.elements[i].type=='submit' || formulaire.elements[i].type=='button'))
{
formulaire.elements[i].value="";
}
}
}
function Verif()
{
if (document.frmMsg.txtSender.value == "" && document.frmMsg.txtFrom.value == "")
{
document.frmMsg.txtErreur.value = 'Merci de renseigner au moins un des champs "Expéditeur" ou "De la part de".';
document.frmMsg.txtErreur.style.visibility = "";
}
else if (document.frmMsg.txtTo.value == "" && document.frmMsg.txtCC.value == "" && document.frmMsg.txtBCC.value == "")
{
document.frmMsg.txtErreur.value = 'Merci de renseigner au moins un des champs "A", "CC" ou "BCC".';
document.frmMsg.txtErreur.style.visibility = "";
}
else if (document.frmMsg.txtSujet.value == "")
{
document.frmMsg.txtErreur.value = 'Merci de renseigner le sujet.';
document.frmMsg.txtErreur.style.visibility = "";
}
else if (document.frmMsg.txtMessage.value.length == 0)
{
document.frmMsg.txtErreur.value = 'Merci de renseigner le message.';
document.frmMsg.txtErreur.style.visibility = "";
}
else
{
document.frmMsg.submit();
}
}
</script>
<style>
#footer {
position: absolute;
bottom: 0;
padding: 10px;
width: 100%;
color:#fff;
text-align:center;
}
#foot_interne {
position: relative;
margin-left: auto;
margin-right: auto;
width: 150px;
text-align:center;
color:#ffffff;
font-size:11px;
padding-top:15px;
font-style:italic;
font-weight:bold;
}
</style>
</head>
<body>
<table align="center" width="80%">
<tr>
<td align="left" width="33%">
<img SRC="Images/logo.gif" border="0" WIDTH="243" HEIGHT="38">
</td>
<td align="center" width="33%">
<font face="arial" size="4" color="LightCyan" style="font-variant:small-caps; font-size:22px; font-weight:bold;">
Service
</font>
</td>
<td align="right" width="33%">
<img SRC="images/Mail.jpg" width="100" height="100" border="0">
</td>
</tr>
</table>
<form name="frmMsg" method="post">
<br><br>
<table align="center" border="0">
<tr>
<td>
<font face="arial" size="3" color="LightCyan">
Expéditeur :
</font>
</td>
<td>
<input type="text" name="txtSender" size="66" value="<%=Request.Form("txtSender")%>">
</td>
</tr>
<tr>
<td>
<font face="arial" size="3" color="LightCyan">
De la part de :
</font>
</td>
<td>
<input type="text" name="txtFrom" size="66" value="<%=Request.Form("txtFrom")%>">
</td>
</tr>
<tr>
<td>
<font face="arial" size="3" color="LightCyan">
A :
</font>
</td>
<td>
<input type="text" name="txtTo" size="66" value="<%=Request.Form("txtTo")%>">
</td>
</tr>
<tr>
<td>
<font face="arial" size="3" color="LightCyan">
CC :
</font>
</td>
<td>
<input type="text" name="txtCC" size="66" value="<%=Request.Form("txtCC")%>">
</td>
</tr>
<tr>
<td>
<font face="arial" size="3" color="LightCyan">
BCC :
</font>
</td>
<td>
<input type="text" name="txtBCC" size="66" value="<%=Request.Form("txtBCC")%>">
</td>
</tr>
<tr>
<td>
<font face="arial" size="3" color="LightCyan">
Sujet :
</font>
</td>
<td>
<input type="text" name="txtSujet" size="66" value="<%=Request.Form("txtSujet")%>">
</td>
</tr>
<tr>
<td valign="top">
<font face="arial" size="3" color="LightCyan">
Message :
</font>
</td>
<td>
<textarea name="txtMessage" cols="50" rows="10"><%=trim(Request.Form("txtMessage"))%></textarea>
</td>
</tr>
<tr>
<td>
</td>
<td align="center">
<br>
<input type="reset" onclick="effacer(this.form); return false;" name="Effacer" value="Effacer le formulaire" style="cursor:pointer">
<br><br><br>
<font face="arial" size="3" color="LightCyan">
Mot de passe :
</font>
<input type="password" name="txtPwd" size="8" value="<%=Request.Form("txtPwd")%>">
<input type="button" onclick="Verif()" name="Envoyer" value="Envoyer" style="background-color:#FF0000; font-weight:bold; color:#FFFFFF; cursor:pointer">
</td>
</tr>
</table>
<p align="center">
<input type="text" name="txtErreur" style="background-color:lightgrey; text-align:center; color:#b22222; font-weight:bold; visibility:hidden" size="100">
</p>
</form>
<%
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = Server.CreateObject ("CDO.Configuration")
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "NomDuServeur" ' Nom du serveur
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ' Port utilisé
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' On utilise un service SMTP
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' Timeout
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0 ' 0 = aucune authentification ; 1 = authentification
oMailConfig.Fields.Update
Set oMail.Configuration = oMailConfig
'oMail.AddAttachment Request.Form("txtPj")
oMail.Sender = Request.Form("txtSender")
oMail.From = Request.Form("txtFrom")
oMail.Fields.Update()
oMail.Subject = Request.Form("txtSujet")
oMail.To = Request.Form("txtTo")
oMail.CC = Request.Form("txtCC")
oMail.BCC = Request.Form("txtBCC")
Body = ""
Body = Body & "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""> "
Body = Body & "<html xmlns=""http://www.w3.org/1999/xhtml"" dir=""ltr"" lang=""fr""> "
Body = Body & "<head>"
Body = Body & "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"" />"
Body = Body & "<meta http-equiv=""Content-Language"" content=""fr"">"
Body = Body & "</head>"
Body = Body & "<body>"
'Body = Body & "<IMG SRC=images/logo.gif>"
Body = Body & "<font face=arial size=3 color=black>"
Body = Body & Request.Form("txtMessage")
Body = Body & "</font>"
Body = Body & "<br /><br /><br /><br />"
Body = Body & "<center>"
Body = Body & "<font face=arial size=2 color=black>"
Body = Body & "<em>"
Body = Body & "<HR>"
Body = Body & "*** Ce message a été envoyé par le système ; Merci de ne pas y répondre. ***"
Body = Body & "<HR>"
Body = Body & "</em>"
Body = Body & "</font>"
Body = Body & "</center>"
Body = Body & "</body>"
Body = Body & "</html>"
oMail.HTMLBody = Body
if (len(trim(Request.Form("txtSender"))) > 0 or len(trim(Request.Form("txtFrom"))) > 0) _
and (len(trim(Request.Form("txtTo"))) > 0 or len(trim(Request.Form("txtCC"))) > 0 or len(trim(Request.Form("txtBCC"))) > 0) _
and len(trim(Request.Form("txtSujet"))) > 0 _
and len(trim(Request.Form("txtMessage"))) > 0 then
if uCase(Request.Form("txtPwd")) <> "????????" then%>
<br>
<table align="center" width="50%" style="background-color=white">
<tr>
<td align="center" style="background-color:lightgrey">
<font face="arial" size="2" color="Firebrick">
<strong>
Merci de saisir le mot de passe.
</strong>
</font>
</td>
</tr>
</table>
<%else
oMail.Send
end if
end if
Set oMailConfiguration = Nothing
Set oMailConfig = Nothing
Set oMail = Nothing
%>
</body>
</html> |