Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > automatic email notification of online form submission

Reply
Thread Tools

automatic email notification of online form submission

 
 
=?Utf-8?B?aGF2ZW5vY2x1ZQ==?=
Guest
Posts: n/a
 
      10-24-2005
I have a database application that is submitted to an Access database. What
I want is when the form is submitted to automatically send an email to
multiple persons with the info from the form. This could be as an
attachement or plain text. I wouldn't care if it was like the mailto. I'm
clueless on how to do this.
Any help would be greatly appreciated.
 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      10-24-2005
Look at the System.Web.Mail namespace

it's pretty easy, check out: http://www.aspheute.com/english/20000918.asp

basically create a new MailMessage, set all the properties (To, From,
Subject, Body) and use the Attachments.Add to point to the file to attach.

before doing a SmtpMail.Send though, you might need to do
SmtpMail.SmtpServer ="SMTP_SERVER_ADDRESS"

I think by default it looks for an smtp server on the same machine as your
web site, which is probably what you want.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"havenoclue" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a database application that is submitted to an Access database.
>What
> I want is when the form is submitted to automatically send an email to
> multiple persons with the info from the form. This could be as an
> attachement or plain text. I wouldn't care if it was like the mailto.
> I'm
> clueless on how to do this.
> Any help would be greatly appreciated.



 
Reply With Quote
 
 
 
 
=?Utf-8?B?aGF2ZW5vY2x1ZQ==?=
Guest
Posts: n/a
 
      10-24-2005
Thanks for your quick response karl.
Forgive me but I'm new to this stuff. I've looked at this before and didn't
really know how to implement this code. Is this from the CodeBehind or the
html
output?

"Karl Seguin" wrote:

> Look at the System.Web.Mail namespace
>
> it's pretty easy, check out: http://www.aspheute.com/english/20000918.asp
>
> basically create a new MailMessage, set all the properties (To, From,
> Subject, Body) and use the Attachments.Add to point to the file to attach.
>
> before doing a SmtpMail.Send though, you might need to do
> SmtpMail.SmtpServer ="SMTP_SERVER_ADDRESS"
>
> I think by default it looks for an smtp server on the same machine as your
> web site, which is probably what you want.
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> "havenoclue" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have a database application that is submitted to an Access database.
> >What
> > I want is when the form is submitted to automatically send an email to
> > multiple persons with the info from the form. This could be as an
> > attachement or plain text. I wouldn't care if it was like the mailto.
> > I'm
> > clueless on how to do this.
> > Any help would be greatly appreciated.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?Q3VydF9DIFtNVlBd?=
Guest
Posts: n/a
 
      10-24-2005
that sample is in the HTML view, but you can easily do this from the
codebehind in the button click event

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com



"havenoclue" wrote:

> Thanks for your quick response karl.
> Forgive me but I'm new to this stuff. I've looked at this before and didn't
> really know how to implement this code. Is this from the CodeBehind or the
> html
> output?
>
> "Karl Seguin" wrote:
>
> > Look at the System.Web.Mail namespace
> >
> > it's pretty easy, check out: http://www.aspheute.com/english/20000918.asp
> >
> > basically create a new MailMessage, set all the properties (To, From,
> > Subject, Body) and use the Attachments.Add to point to the file to attach.
> >
> > before doing a SmtpMail.Send though, you might need to do
> > SmtpMail.SmtpServer ="SMTP_SERVER_ADDRESS"
> >
> > I think by default it looks for an smtp server on the same machine as your
> > web site, which is probably what you want.
> >
> > Karl
> >
> > --
> > MY ASP.Net tutorials
> > http://www.openmymind.net/
> > "havenoclue" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > >I have a database application that is submitted to an Access database.
> > >What
> > > I want is when the form is submitted to automatically send an email to
> > > multiple persons with the info from the form. This could be as an
> > > attachement or plain text. I wouldn't care if it was like the mailto.
> > > I'm
> > > clueless on how to do this.
> > > Any help would be greatly appreciated.

> >
> >
> >

 
Reply With Quote
 
=?Utf-8?B?aGF2ZW5vY2x1ZQ==?=
Guest
Posts: n/a
 
      10-24-2005
I tried the code behind and got
COMException (0x80040213): The transport failed to connect to the server

Dim email As New System.Web.Mail.MailMessage
email.To = " "
email.From = " "
email.Body = " "
email.Subject = " "
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send(email)

When I use my own server domain it gives me
550 5.7.1 Unable to relay for " "



"Curt_C [MVP]" wrote:


> that sample is in the HTML view, but you can easily do this from the
> codebehind in the button click event
>
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
>
>
>
> "havenoclue" wrote:
>
> > Thanks for your quick response karl.
> > Forgive me but I'm new to this stuff. I've looked at this before and didn't
> > really know how to implement this code. Is this from the CodeBehind or the
> > html
> > output?
> >
> > "Karl Seguin" wrote:
> >
> > > Look at the System.Web.Mail namespace
> > >
> > > it's pretty easy, check out: http://www.aspheute.com/english/20000918.asp
> > >
> > > basically create a new MailMessage, set all the properties (To, From,
> > > Subject, Body) and use the Attachments.Add to point to the file to attach.
> > >
> > > before doing a SmtpMail.Send though, you might need to do
> > > SmtpMail.SmtpServer ="SMTP_SERVER_ADDRESS"
> > >
> > > I think by default it looks for an smtp server on the same machine as your
> > > web site, which is probably what you want.
> > >
> > > Karl
> > >
> > > --
> > > MY ASP.Net tutorials
> > > http://www.openmymind.net/
> > > "havenoclue" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > >I have a database application that is submitted to an Access database.
> > > >What
> > > > I want is when the form is submitted to automatically send an email to
> > > > multiple persons with the info from the form. This could be as an
> > > > attachement or plain text. I wouldn't care if it was like the mailto.
> > > > I'm
> > > > clueless on how to do this.
> > > > Any help would be greatly appreciated.
> > >
> > >
> > >

 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      10-24-2005
Where is your smtp serve rrunning?

As I said in my original post, you'll likely have to specify the address of
the SMTP server via SmtpMail.SmtpServer

IIS has an smtp server built-in, perhaps you need to start the service?
(simple mail transfer protocol I believe it's called), and point your
SmtpServer to 127.0.0.1 (local)

karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"havenoclue" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I tried the code behind and got
> COMException (0x80040213): The transport failed to connect to the server
>
> Dim email As New System.Web.Mail.MailMessage
> email.To = " "
> email.From = " "
> email.Body = " "
> email.Subject = " "
> email.BodyFormat = Web.Mail.MailFormat.Text
> System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
> System.Web.Mail.SmtpMail.Send(email)
>
> When I use my own server domain it gives me
> 550 5.7.1 Unable to relay for " "
>
>
>
> "Curt_C [MVP]" wrote:
>
>
>> that sample is in the HTML view, but you can easily do this from the
>> codebehind in the button click event
>>
>> --
>> Curt Christianson
>> site: http://www.darkfalz.com
>> blog: http://blog.darkfalz.com
>>
>>
>>
>> "havenoclue" wrote:
>>
>> > Thanks for your quick response karl.
>> > Forgive me but I'm new to this stuff. I've looked at this before and
>> > didn't
>> > really know how to implement this code. Is this from the CodeBehind or
>> > the
>> > html
>> > output?
>> >
>> > "Karl Seguin" wrote:
>> >
>> > > Look at the System.Web.Mail namespace
>> > >
>> > > it's pretty easy, check out:
>> > > http://www.aspheute.com/english/20000918.asp
>> > >
>> > > basically create a new MailMessage, set all the properties (To, From,
>> > > Subject, Body) and use the Attachments.Add to point to the file to
>> > > attach.
>> > >
>> > > before doing a SmtpMail.Send though, you might need to do
>> > > SmtpMail.SmtpServer ="SMTP_SERVER_ADDRESS"
>> > >
>> > > I think by default it looks for an smtp server on the same machine as
>> > > your
>> > > web site, which is probably what you want.
>> > >
>> > > Karl
>> > >
>> > > --
>> > > MY ASP.Net tutorials
>> > > http://www.openmymind.net/
>> > > "havenoclue" <(E-Mail Removed)> wrote in message
>> > > news:(E-Mail Removed)...
>> > > >I have a database application that is submitted to an Access
>> > > >database.
>> > > >What
>> > > > I want is when the form is submitted to automatically send an email
>> > > > to
>> > > > multiple persons with the info from the form. This could be as an
>> > > > attachement or plain text. I wouldn't care if it was like the
>> > > > mailto.
>> > > > I'm
>> > > > clueless on how to do this.
>> > > > Any help would be greatly appreciated.
>> > >
>> > >
>> > >



 
Reply With Quote
 
=?Utf-8?B?aGF2ZW5vY2x1ZQ==?=
Guest
Posts: n/a
 
      10-24-2005
Thanks Karl and Curt

I have it now. Just have more problems.

"Karl Seguin" wrote:

> Where is your smtp serve rrunning?
>
> As I said in my original post, you'll likely have to specify the address of
> the SMTP server via SmtpMail.SmtpServer
>
> IIS has an smtp server built-in, perhaps you need to start the service?
> (simple mail transfer protocol I believe it's called), and point your
> SmtpServer to 127.0.0.1 (local)
>
> karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
> "havenoclue" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I tried the code behind and got
> > COMException (0x80040213): The transport failed to connect to the server
> >
> > Dim email As New System.Web.Mail.MailMessage
> > email.To = " "
> > email.From = " "
> > email.Body = " "
> > email.Subject = " "
> > email.BodyFormat = Web.Mail.MailFormat.Text
> > System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
> > System.Web.Mail.SmtpMail.Send(email)
> >
> > When I use my own server domain it gives me
> > 550 5.7.1 Unable to relay for " "
> >
> >
> >
> > "Curt_C [MVP]" wrote:
> >
> >
> >> that sample is in the HTML view, but you can easily do this from the
> >> codebehind in the button click event
> >>
> >> --
> >> Curt Christianson
> >> site: http://www.darkfalz.com
> >> blog: http://blog.darkfalz.com
> >>
> >>
> >>
> >> "havenoclue" wrote:
> >>
> >> > Thanks for your quick response karl.
> >> > Forgive me but I'm new to this stuff. I've looked at this before and
> >> > didn't
> >> > really know how to implement this code. Is this from the CodeBehind or
> >> > the
> >> > html
> >> > output?
> >> >
> >> > "Karl Seguin" wrote:
> >> >
> >> > > Look at the System.Web.Mail namespace
> >> > >
> >> > > it's pretty easy, check out:
> >> > > http://www.aspheute.com/english/20000918.asp
> >> > >
> >> > > basically create a new MailMessage, set all the properties (To, From,
> >> > > Subject, Body) and use the Attachments.Add to point to the file to
> >> > > attach.
> >> > >
> >> > > before doing a SmtpMail.Send though, you might need to do
> >> > > SmtpMail.SmtpServer ="SMTP_SERVER_ADDRESS"
> >> > >
> >> > > I think by default it looks for an smtp server on the same machine as
> >> > > your
> >> > > web site, which is probably what you want.
> >> > >
> >> > > Karl
> >> > >
> >> > > --
> >> > > MY ASP.Net tutorials
> >> > > http://www.openmymind.net/
> >> > > "havenoclue" <(E-Mail Removed)> wrote in message
> >> > > news:(E-Mail Removed)...
> >> > > >I have a database application that is submitted to an Access
> >> > > >database.
> >> > > >What
> >> > > > I want is when the form is submitted to automatically send an email
> >> > > > to
> >> > > > multiple persons with the info from the form. This could be as an
> >> > > > attachement or plain text. I wouldn't care if it was like the
> >> > > > mailto.
> >> > > > I'm
> >> > > > clueless on how to do this.
> >> > > > Any help would be greatly appreciated.
> >> > >
> >> > >
> >> > >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
form submission that triggers email notification Homer ASP .Net 1 08-10-2007 03:21 PM
Form Submission Automatic To Another URL degmsb@hotmail.com Perl Misc 2 02-26-2006 05:59 AM
automatic form submission Piotr Kurpiel Javascript 1 03-18-2005 05:30 PM
simple perl script for automatic form submission. sam Perl Misc 6 11-13-2004 01:38 PM
Automatic form submission BernieH HTML 3 10-07-2004 11:12 AM



Advertisments