How is this done in C#?
--- Fredrik Normen <fredrik.normen@e...> wrote:
> It's simple to doing this in asp+.
> You use the smtpmail and mailmessage classes from
> the System.Web.Util
> namespace.
> You need to install/setup a Virtual SMTP Server in
> the Internet Service
> Manager.
>
> After this you simple write:
>
> objMail = New smtpmail
> ObjMessage = New MailMessage
>
> ObjMessage.From = "Fredrik"
> ObjMessage.To = "fredrik.normen@e..."
> ObjMessage.Subject = "My subject"
> ObjMessage.BodyFormat = 1
> Dim strBodyMail = "I've got mail"
>
> ObjMessage.Body = strBodyMail
> objMail.send(ObjMessage)
>
> I hope this will help you.
>
> /Fredrik Normen
>
>
>
>
> ----- Original Message -----
> From: Anders Lundholm <alu@m...>
> Date: Wednesday, November 8, 2000 3:25 pm
> Subject: [aspx] How to utilize the SMTP Service in
> aspx!
>
> > Hello again (Frederik are you still with me?!)
> >
> > I was wondering how one could actually send
> e-mails from an aspx
> > page using
> > the .net runtime framework. In the oldschool
> regular asp world,
> > one would
> > instantiate a "cdonts.newmail" object (or using
> the excellent jmail
> > component, for instance) and use that as a
> connection to a smtp
> > server (the
> > former would often be a local smtp server).
> >
> > The docs doesn't say much about smtp services so I
> figure I'd have
> > to use
> > the good old COM object in order to send e-mails
> from aspx pages?! Or
> > perhaps I should write the plumbing myself (using
> the System.Net
> > assemblywhich would be cumbersome) !?
> >
> > Thanks in advance!
> >
> > With regards
> > Anders Lundholm · lundholm@m... · www.mondo.dk
> > Graphics Design · Web Development · HandCrafted
> Code (tm)
> > --
> > http://www.sphereworx.com [sphere · worx]
> >
>
---
http://www.asptoday.com - the leading site for timely,
in-depth information for ASP developers everywhere.
---
You are currently subscribed to aspx as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com