Vous devez être membre et vous identifier pour publier un article.
Les visiteurs peuvent toutefois commenter chaque article par une réponse.
ENVOIE MAIL EN SMTP DEPUIS WINDOWS 2003 / ASP SANS COMPOSANT
Article publié le 31/01/2005 10:32:38Pour faire plaisir à Steph, ce code permet d'envoyer depuis un server ASP windows 2003 un mail sans composant suplement via un serveur mail SMTP avec controle d'identification.
Code asp (46 lignes)
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing" Const cdoSendUsingPort = 2 Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver" Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport" Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" Const cdoBasic = 1 Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername" Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword" Dim objConfig ' As CDO.Configuration Dim objMessage ' As CDO.Message Dim Fields ' As ADODB.Fields ' Get a handle on the config object and it's fields Set objConfig = Server.CreateObject("CDO.Configuration") Set Fields = objConfig.Fields ' Set config fields we care about With Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "ServerSmtp" .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPConnectionTimeout) = 20 .Item(cdoSMTPAuthenticate) = cdoBasic .Item(cdoSendUserName) = "LOGIN" .Item(cdoSendPassword) = "Mot De Passe" .Update End With Set objMessage = Server.CreateObject("CDO.Message") Set objMessage.Configuration = objConfig With objMessage .To = "Adresse Mail destinataire" .From = "Adresse Mail emetteur" .Subject = "Sujet du mail" .TextBody = "Contenu du message a envoyer " .Send End With Set Fields = Nothing Set objMessage = Nothing Set objConfig = Nothing
Un article de Akira SatoModifié 1 fois. (dernière modification le 09/05/2005 22:24:00 par Lea72)
Source : www.aspfr.com
Commentaires
09/05/2005 22:27:34 : Pas clair...
J'ai essayé de modifier ton message pour corriger l'orthographe, mais je ne comprend pas le sens de la première phrase ????
Tu sais le recomposer?
Merci.
- Lea72 -
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 13/09/2004, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/ast-rf-196.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.