Envoyer un mail c'est impossible ???

Utilisateur anonyme - 13 mai 2005 à 19:44
 Utilisateur anonyme - 14 mai 2005 à 12:47
Hello, g plusieurs script pour envoyer un mail...

Aucun ne marche sur mon serveur distant, je ne sais pas encore PK

L'erreur est la suivante HELP C IMPORTANT SVP

System.Runtime.InteropServices.COMException:The
server rejected one or more recipient addresses. The serverresponse
was: 503 This mail server requires authentication. Pleasecheck your
mail client settings.

Aparait au moment de l'envoi



Je pige pas on ma dit kil fallait s'identifier sur le serveur alors je l'ai fait mais ça change rien de rien

[blue]On a rien sans rien/blue

4 réponses

jesusonline Messages postés 6814 Date d'inscription dimanche 15 décembre 2002 Statut Membre Dernière intervention 13 octobre 2010 29
13 mai 2005 à 20:50
faut s'identifier via le code, on peut voir le code ?


<HR>
Cyril - MCP ASP.net
Webmaster de : Hoshimi.CodeS-SourceS.fr
0
Utilisateur anonyme
13 mai 2005 à 23:08
Oui bien sur



<%@ Page Language="VB" Debug="True" %>

<%@ Import namespace="System" %>

<%@ Import namespace="System.Web.Mail" %>

<script language="vb" runat="server">

Sub Page_Load(sender As Object, e As EventArgs)

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

objConfig = Server.CreateObject("CDO.Configuration")

Fields = objConfig.Fields



' Set config fields we care about

With Fields

.Item(cdoSendUsingMethod) = cdoSendUsingPort

.Item(cdoSMTPServer) = "mail.dadamagouil.com"

.Item(cdoSMTPServerPort) = 25

.Item(cdoSMTPConnectionTimeout) = 20

.Item(cdoSMTPAuthenticate) = cdoBasic

.Item(cdoSendUserName) = "identifiant"

.Item(cdoSendPassword) = "pass"

.Update

End With



objMessage = Server.CreateObject("CDO.Message")



objMessage.Configuration = objConfig



With objMessage

.To = ""

.From = ""

.Subject = "Sujet du mail"

.TextBody = "Contenu du message a envoyer "

.Send

End With



Fields = Nothing

objMessage = Nothing

objConfig = Nothing

End Sub

</script>



c mon code mais ca marche pas. Pourtant je met toutes les donné d'identification

[blue]On a rien sans rien/blue
0
jesusonline Messages postés 6814 Date d'inscription dimanche 15 décembre 2002 Statut Membre Dernière intervention 13 octobre 2010 29
13 mai 2005 à 23:15
Regarde cette article : http://webman.developpez.com/articles/aspnet/email/vbnet

car la j'ai l'impression que tu es completement perdu :-)

donc recommence tout de zero, en suivant les conseils de l'article. Ca devrait marcher.


<HR>
Cyril - MCP ASP.net
Webmaster de : Hoshimi.CodeS-SourceS.fr
0
Utilisateur anonyme
14 mai 2005 à 12:47
Oki merci

On a rien sans rien
0
Rejoignez-nous