Hey i am a total newbie in .net.I'm working on an assignment to send email to
the adimin id that's my official id (xx.xx@something.com - the code
developers id) when an invalid user trys to login to the application.I have
to connect to my comapy's server to send emails.In the code when i give the
mailserver as local host the message gets stored in my queues folder.If i
giver the ip address of the server i want to connect to server unreachable
error keeps coming.I dont know if it is due to authentication issues or SMTP
configuration or GOD knows what else :( Here's the code:
msgMail.To = "xx.xx@domain.com"
msgMail.From = "yy.yy@domian.com"
msgMail.Subject = "Notification on Invalid User Login into
System"
msgMail.BodyFormat = MailFormat.Html
strBody = "<html><body><b>Invaild User
Login</b></body></html>"
msgMail.Body = strBody
SmtpMail.SmtpServer = "192.168.23.240"
SmtpMail.Send(msgMail)
Response.Write("Email was qued to disk")
error:
Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.
Well anydody out there with a solution coz i'm in a fix i've spent a whole
day trying to fix this and i'm desperate...............
JRoppert - 20 May 2005 13:01 GMT
Check that you have CDO (Colloaboration Data Objects) installed.
> Hey i am a total newbie in .net.I'm working on an assignment to send
> email to the adimin id that's my official id (xx.xx@something.com -
[quoted text clipped - 23 lines]
> Well anydody out there with a solution coz i'm in a fix i've spent a
> whole day trying to fix this and i'm desperate...............
ufraf - 30 May 2005 05:45 GMT
Yeha i do have it installed. i added refrence to CDO thro the solution explorer
> Check that you have CDO (Colloaboration Data Objects) installed.
>
[quoted text clipped - 25 lines]
> > Well anydody out there with a solution coz i'm in a fix i've spent a
> > whole day trying to fix this and i'm desperate...............
anjanadevicr@yahoo.com - 25 May 2005 11:15 GMT
hai ,
i think first u have to give the string HELO to the smtp server
only then it will start connecting
once u r msg is over then end the mail by "."
i think this will help u
cheers,
vidhyasudha C.R
Joachim Roppert - 25 May 2005 13:20 GMT
As long as you're using the .Net classes, you don't need to talk to the SMTP
server at such a low level :-)
> hai ,
>
[quoted text clipped - 10 lines]
> Comprehensive, categorised, searchable collection of links to ASP &
> ASP.NET resources...