Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

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

Astuces de l’Infobrol (Développement)Article publié le 31/01/2005 10:32:38


Pour 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. ;-)


  1. Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
  2. Const cdoSendUsingPort = 2
  3. Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
  4. Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
  5. Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
  6. Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
  7. Const cdoBasic = 1
  8. Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
  9. Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
  10.  
  11. Dim objConfig ' As CDO.Configuration
  12. Dim objMessage ' As CDO.Message
  13. Dim Fields ' As ADODB.Fields
  14.  
  15. ' Get a handle on the config object and it's fields
  16. Set objConfig = Server.CreateObject("CDO.Configuration")
  17. Set Fields = objConfig.Fields
  18.  
  19. ' Set config fields we care about
  20. With Fields
  21. .Item(cdoSendUsingMethod) = cdoSendUsingPort
  22. .Item(cdoSMTPServer) = "ServerSmtp"
  23. .Item(cdoSMTPServerPort) = 25
  24. .Item(cdoSMTPConnectionTimeout) = 20
  25. .Item(cdoSMTPAuthenticate) = cdoBasic
  26. .Item(cdoSendUserName) = "LOGIN"
  27. .Item(cdoSendPassword) = "Mot De Passe"
  28.  
  29. .Update
  30. End With
  31.  
  32. Set objMessage = Server.CreateObject("CDO.Message")
  33.  
  34. Set objMessage.Configuration = objConfig
  35.  
  36. With objMessage
  37. .To = "Adresse Mail destinataire"
  38. .From = "Adresse Mail emetteur"
  39. .Subject = "Sujet du mail"
  40. .TextBody = "Contenu du message a envoyer "
  41. .Send
  42. End With
  43.  
  44. Set Fields = Nothing
  45. Set objMessage = Nothing
  46. Set objConfig = Nothing


Avatar :: Akira Sato Un article de Akira SatoModifié 1 fois. (dernière modification le 09/05/2005 22:24:00 par Lea72)



Source : www.aspfr.com


Commenter l'article

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 -

Sélection, tri et recherche d'articles
FILTRER :
TRIER :1er critère : 2e critère :
CHERCHER : Dans les titres Dans le contenu


[Afficher les liens en fonction des critères du formulaire ci-dessus]

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 13/09/2004 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/ast-rf-196.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.