Hi,
I am trying to send email using JMail dll.
I want to send mail from my localhost to any email address like hotmail.com, yahoo.com or other.
I am trying to send it through ASP using JMail.dll
The code is as follows.
on error resume next
Dim oMessage,errorstr
Set oMessage = Server.CreateObject("JMail.SMTPMail")
With oMessage
.Silent = True
.Logging = True
.ServerAddress="mail.mydomain.com"
.Sender = "
[email protected]"
.AddRecipient "
[email protected]"
.Subject = "this is the subject"
.Body = "this is the body"
.AddAttachment "c:\test.txt"
.execute
End With
if err.number<>0 then
errorstr= "ERROR: " & .Log
else
errorstr="Message Sent.."
end f
'Cleanup
Set oMessage = nothing
SendEmailJMail = errorstr
but Error is raised while sending it the error is as follows.
ERROR: The message was undeliverable. All servers failed to receive the message .execute() { Trying server mail:mail.mydomain.com mail.mydomain.com failed with the message: "WSAGetLastError() returned 10051, Network is unreachable" No socket for server. ConnectToServer() 1 of 1 servers failed }
Please Give me some solution, so that i can send the mail using localhost.
PS I am using IIS 5 on windows 2000 professional .
i am using this for a local website to send the mail.
Please help....
With regards
Haji Muffadal