PDA

View Full Version : سلام مشکل Mailing List



alijaan
دوشنبه 12 اردیبهشت 1384, 09:08 صبح
سلام من در سایتم یک mailing List راه اندازی کردم ولی موقعی که میخواهم با آن کار کنم این Error رو میده

Persits.MailSender.4 error '800a0006'

550 not local host yahoo.com, not a gateway

/mailing_list/send_mail_functions_inc.asp, line 266

آیا کسی میتونه به من کمک کنه

ممنونم
علی
:reading:

Nightbat
دوشنبه 12 اردیبهشت 1384, 11:01 صبح
کدت رو بذار اینجا :sunglass:

alijaan
دوشنبه 12 اردیبهشت 1384, 11:34 صبح
<%


'Declare global variables
Dim objCDOSYSMail 'Holds the CDOSYS mail object
Dim objCDOMail 'Holds the CDONTS mail object
Dim objJMail 'Holds the Jmail object
Dim objAspEmail 'Holds the Persits AspEmail email object
Dim objAspMail 'Holds the Server Objects AspMail email object


'****************************************
'** Create mail function **
'****************************************

'Function to create mail object
Public Function createMailObject(strMailComponent)



'Select which email component to use
Select Case strMailComponent

'CDOSYS mail component
Case "CDOSYS"

'Dimension variables
Dim objCDOSYSCon

'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

'Set and update fields properties
With objCDOSYSCon
'Out going SMTP server
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
'SMTP port
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'CDO Port
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Timeout
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Fields.Update
End With

'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon

'CDONTS mail component
Case "CDONTS"

'With CDONTS the object has to be created for each email

'JMail component
Case "Jmail"

'Create the e-mail server object
Set objJMail = Server.CreateObject("JMail.SMTPMail")

'AspEmail component
Case "AspEmail"

'Create the e-mail server object
Set objAspEmail = Server.CreateObject("Persits.MailSender")

'AspMail component
Case "AspMail"

'Create the e-mail server object
Set objAspMail = Server.CreateObject("SMTPsvg.Mailer")

End Select
End Function



'****************************************
'** Drop mail function **
'****************************************

'Function to drop mail object
Public Function dropMailObject(strMailComponent)

'Select which email component to use
Select Case strMailComponent

'CDOSYS mail component
Case "CDOSYS"
Set objCDOSYSMail = Nothing

'CDONTS mail component
Case "CDONTS"
'With CDONTS the object has to be created and dropped for each email

'JMail component
Case "Jmail"
Set objJMail = Nothing

'AspEmail component
Case "AspEmail"
Set objAspEmail = Nothing

'AspMail component
Case "AspMail"
Set objAspMail = Nothing
End Select
End Function



'****************************************
'** Send mail function **
'****************************************

'Function to send an e-mail
Public Function SendMail(strEmailAddress, strMailComponent, strMailFormat)

'Select which email component to use
Select Case strMailComponent

'CDOSYS mail component
Case "CDOSYS"

With objCDOSYSMail
'Who the e-mail is from
.From = strWebsiteName & " <" & strWebsiteEmailAddress & ">"

'Who the e-mail is sent to
.To = strEmailAddress

'The subject of the e-mail
.Subject = strSubject

'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then
.HTMLBody = strEmailBody & strAppendToEmail
Else
.TextBody = strEmailBody & strAppendToEmail
End If

'Send the e-mail
If NOT strMailServer = "" Then .Send
End with

'CDONTS mail component
Case "CDONTS"

'Create the e-mail server object (this has to be set with each email for CDONTS)
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

With objCDOMail
'Who the e-mail is from
.From = strWebsiteName & " <" & strWebsiteEmailAddress & ">"

'Who the e-mail is sent to
.To = strEmailAddress

'The subject of the e-mail
.Subject = strSubject

'The main body of the e-amil
.Body = strEmailBody & strAppendToEmail

'Set the e-mail body format (0=HTML 1=Text)
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then
.BodyFormat = 0
Else
.BodyFormat = 1
End If

'Set the mail format (0=MIME 1=Text)
.MailFormat = 0

'Importance of the e-mail (0=Low, 1=Normal, 2=High)
.Importance = 1

'Send the e-mail
.Send
End With

'Release the object (this has to be done with each email for CDONTS)
Set objCDOMail = Nothing


'JMail component
Case "Jmail"

With objJMail
'Out going SMTP mail server address
.ServerAddress = strMailServer

'Who the e-mail is from
.Sender = strWebsiteEmailAddress
.SenderName = strWebsiteName

'Who the e-mail is sent to
.AddRecipient strEmailAddress

'The subject of the e-mail
.Subject = strSubject

'Set the e-mail body format (BodyHTML=HTML Body=Text)
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then
.HTMLBody = strEmailBody & strAppendToEmail
Else
.Body = strEmailBody & strAppendToEmail
End If

'Importance of the e-mail
.Priority = 3

'Send the e-mail
If NOT strMailServer = "" Then .Execute

'Clear the Recipient List
.ClearRecipients()
End With


'AspEmail component
Case "AspEmail"

With objAspEmail
'Out going SMTP mail server address
.Host = strMailServer

'Who the e-mail is from
.From = strWebsiteEmailAddress
.FromName = strWebsiteName

'Who the e-mail is sent to
.AddAddress strEmailAddress

'The subject of the e-mail
.Subject = strSubject

'Set the e-mail body format (BodyHTML=HTML Body=Text)
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then
.IsHTML = True
End If

'The main body of the e-mail
.Body = strEmailBody & strAppendToEmail

'Send the e-mail
If NOT strMailServer = "" Then .Send

'Reset the object
.ResetAll
End With


'AspMail component
Case "AspMail"

With objAspMail
'Out going SMTP mail server address
.RemoteHost = strMailServer

'Who the e-mail is from
.FromAddress = strWebsiteEmailAddress
.FromName = strWebsiteName

'Who the e-mail is sent to
.AddRecipient " ", strEmailAddress

'The subject of the e-mail
.Subject = strSubject

'Set the e-mail body format (BodyHTML=HTML Body=Text)
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then
.ContentType = "text/HTML"
End If

'The main body of the e-mail
.BodyText = strEmailBody & strAppendToEmail

'Send the e-mail
If NOT strMailServer = "" Then .SendMail

'Clear the Recipient List
.ClearRecipients

'Clear the email body text
.ClearBodyText
End With
End Select
End Function




'****************************************
'** Create mail body function **
'****************************************

'Function create the remove appended part of the email
Private Function mailBody(strMailFormat, strUserCode, blnLCode)

'If the e-mail is in HTML format then change the format of the e-mail
If strMailFormat = "HTML" OR strMailFormat = "advHTML" Then

'Write a remove from mailing list message to add to the end of the e-mail in HTML Format
strAppendToEmail = "

<hr>"
strAppendToEmail = strAppendToEmail &amp; "Web Wiz Mailing List ("]در صورتی که بخواهید از گروه پست الکترونیک ما خارج شوید میتوانید اینجا کلیک کنید[/url]"
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
' If blnLCode = True Then
' strAppendToEmail = strAppendToEmail &amp; "

Powered by [url=") version 3.02"
' End If
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
strAppendToEmail = strAppendToEmail &amp; "&lt;/body>&lt;/html>"

Else
'Write a remove from mailing list message to add to the end of the e-mail in Plain Text Format
strAppendToEmail = vbCrLf &amp; vbCrLf &amp; "__________________________________________________ ________"
strAppendToEmail = strAppendToEmail &amp; vbCrLf &amp; vbCrLf &amp; ": در صورتی که بخواهید از گروه پست الکترونیک ما خارج شوید میتوانید بر روی لینک پایینی کلیک کنید"
strAppendToEmail = strAppendToEmail &amp; vbCrLf &amp; strWebsiteAddress &amp; "/mailing_list/remove.asp?ID=" &amp; strUserCode
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
' If blnLCode = True Then
' strAppendToEmail = strAppendToEmail &amp; vbCrLf &amp; vbCrLf &amp; "Powered by Web Wiz Mailing List version 3.02 - http://www.webwizguide.info"
' End If
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
End If

mailBody = strAppendToEmail
End Function
%>

Asad.Safari
سه شنبه 13 اردیبهشت 1384, 14:35 عصر
آیا کامپوننت CDontرو روی یرورت رجیستر کردی ؟؟؟

فکر کنم مشکل از همینه !