Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: SmtpMail


Message #1 by "Vikram Joshi" <vikyjoshi@r...> on Wed, 6 Jun 2001 07:56:06
well i have made a small application to send mails thru the asp.net page..

what  u try is that initially 

make an instance of class MailMessage

populate the methods of this class with the respective values then use the 

smtpmail.send method for the above object.

 i have inserted the code below...

take a look at it

hope this solves your problem



Dim mailobj As MailMessage

        mailobj = New MailMessage()

        mailobj.From = trim(request.Form("txtfrom"))

        mailobj.To = trim(request.Form("txtto"))

        mailobj.Body = trim(request.Form("txtmailbody"))

        mailobj.Subject = trim(request.Form("txtsubject"))

        mailobj.BodyFormat = MailFormat.Html

        smtpmail.Send(mailobj)



vikram



> 

> 

> Has anyone had problems using the SmtpMail capability in .NET? We're 

> trying to us it, it gives no error message, but also doesn't send the 

> message.


  Return to Index