30 juin 2005

essai de formulaire

<%
' change to address of your own SMTP server
strHost = "192.168.135.46"

If Request("Send") <> "" Then
Set Mail = Server.CreateObject ("Persits.MailSender")
' enter valid SMTP host
Mail.Host = strHost
Mail.UserName = "cathocms"
Mail.Password = "catho2005"
' Mail.From = mail_from
' Mail.FromName = "Cathobel"
' Mail.AddAddress mail_to
' Mail.Subject = "Le sujet du mail!!"

's'il s'agit d'un mail en HTML (si mail format txt, commenter ou enlever la ligne suivante)
' Mail.IsHTML = true
' Contenu = "le contenu du ail en HTML ou en TXT"
' Contenu = Contenu & "La suite du contenu du mail"
'pour passer à la ligne dans un mail en txt on utilise la ligne suivante
' Contenu = Contenu & VbCrlf 'pour 1


' 'Envoi du mail
' Mail.Body = Contenu
' Mail.Send
' Set Mail = Nothing

Mail.From = Request("From") ' From address
Mail.FromName = Request("FromName") ' optional
Mail.AddAddress Request("To")

' message subject
Mail.Subject = Request("Subject")
' message body
Mail.Body = Request("Body")
strErr = ""
bSuccess = False
On Error Resume Next ' catch errors
Mail.Send ' send message
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If
End If
%>



<% If strErr <> "" Then %>

Error occurred: <% = strErr %>
<% End If %>
<% If bSuccess Then %>
Success! Message sent to <% = Request("To") %>.
<% End If %>





























Host (change as necessary in script): <% = strHost %>
From (enter sender's address):
FromName (optional, enter sender's name):
To: (enter one recipient's address):
Subject:
Body: