Send an email using ASP (alternative to Jmail)

Procédure

Why have an alternative to the Jmail component?

Jmail is an old component that may not function properly on the latest versions of the Plesk panel, so it is recommended that you have an alternative to this component.
In our case, the CDO component is a good alternative to Jmail.

How do I send an email from the CDO component?

Here is an example of the code you could use

<%

'declaration variable formulaire'
z01 = " Nom : " & Request.Form("nom")
z02 = " Prenom : " & Request.Form("prenom")
z03 = " Email : " & Request.Form("zmail")
z04 = " Pays : " & Request.Form("pays")
z05 = " Objet : " & Request.Form("sujet")
z06 = " Message : " & Request.Form("message")

corps= z01 & vbCrLf & z02 & vbCrLf & z03 & vbCrLf & z04 & vbCrLf & z05 & vbCrLf & z06 

schema = "http://schemas.microsoft.com/cdo/configuration/"

Set msg = CreateObject("CDO.Message")
msg.Subject  = "le sujet de votre formulaire"
msg.From     = "l'adresse email d'envoi de ce formulaire"
msg.To       = "l'adresse qui receptionnera ce formulaire"
msg.TextBody = "This is some sample message text."

With msg.Configuration.Fields
  .Item(schema & "sendusing")      = 2
  .Item(schema & "smtpserver")     = "mailler21.lws-hosting.com"
  .Item(schema & "smtpserverport") = 26
  .Update
End With

msg.Send
%>

You will need to replace the following variables :

the subject of your form

with the subject of your email

the email address used to send your form

by the address sending this form, I recommend that you indicate an address associated with your domain

the address that will receive your form

by the email address that should receive this email

Rate this article :

3/5 | 4 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

0mn reading

How do I create an email inbox in Plesk?

0mn reading

Send an e-mail using the Jmail component


Ask the LWS team and its community a question