473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Just a little help

I have an asp.net app with C# as the code behind. When a user changes the
'status' (the app has a work-flow feature) of a purchase order I need to
perhaps send an email to a known address.

Thus, if the po is new and the user changes it to 'submitted' then I need to
send an email to the guy in charge of accepting or rejecting purchase orders.
It doesn't have to be from the person that submitted the po, but it has to
indicate the po # (which I have).

Could somebody point me to some documentation where I can figure out how to
write a server side object that allows me to send emails programatically?
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.

Animadverto est verus
Nov 17 '05 #1
3 970
Rik,

If you are using .NET 1.1 and earlier, you can check out the classes in
the System.Web.Mail namespace. If you are using a beta of 2.0, or will
adopt 2.0 soon, look at the System.Net.Mail namespace.

You can also take a look at the Indy Project
(http://www.indyproject.org/), as they have classes that can send email.

Whatever solution you use, you will have to change the user that the
page runs under. By default, it is ASPNET, and does not have rights to
access the network. You might want to impersonate a user in your page while
you send the email (which can be done through the WindowsIdentity class), or
change the identity that all pages in the app run under (through
web.config). Of course, the latter is easier to config, but much more
dangerous.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rik Brooks" <rb*****@hhcc.com.donotspam> wrote in message
news:30**********************************@microsof t.com...
I have an asp.net app with C# as the code behind. When a user changes the
'status' (the app has a work-flow feature) of a purchase order I need to
perhaps send an email to a known address.

Thus, if the po is new and the user changes it to 'submitted' then I need
to
send an email to the guy in charge of accepting or rejecting purchase
orders.
It doesn't have to be from the person that submitted the po, but it has to
indicate the po # (which I have).

Could somebody point me to some documentation where I can figure out how
to
write a server side object that allows me to send emails programatically?
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.

Animadverto est verus

Nov 17 '05 #2
I swear there are so many things to learn. Could you tell me how to change
the identity in web.config? This will be running on an intranet only so the
security is less of an issue.
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.

Animadverto est verus


"Nicholas Paldino [.NET/C# MVP]" wrote:
Rik,

If you are using .NET 1.1 and earlier, you can check out the classes in
the System.Web.Mail namespace. If you are using a beta of 2.0, or will
adopt 2.0 soon, look at the System.Net.Mail namespace.

You can also take a look at the Indy Project
(http://www.indyproject.org/), as they have classes that can send email.

Whatever solution you use, you will have to change the user that the
page runs under. By default, it is ASPNET, and does not have rights to
access the network. You might want to impersonate a user in your page while
you send the email (which can be done through the WindowsIdentity class), or
change the identity that all pages in the app run under (through
web.config). Of course, the latter is easier to config, but much more
dangerous.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rik Brooks" <rb*****@hhcc.com.donotspam> wrote in message
news:30**********************************@microsof t.com...
I have an asp.net app with C# as the code behind. When a user changes the
'status' (the app has a work-flow feature) of a purchase order I need to
perhaps send an email to a known address.

Thus, if the po is new and the user changes it to 'submitted' then I need
to
send an email to the guy in charge of accepting or rejecting purchase
orders.
It doesn't have to be from the person that submitted the po, but it has to
indicate the po # (which I have).

Could somebody point me to some documentation where I can figure out how
to
write a server side object that allows me to send emails programatically?
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.

Animadverto est verus


Nov 17 '05 #3
Rik,

Here is a link to the identity element in web.config:

http://msdn.microsoft.com/library/de...itysection.asp
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rik Brooks" <rb*****@hhcc.com.donotspam> wrote in message
news:0C**********************************@microsof t.com...
I swear there are so many things to learn. Could you tell me how to change
the identity in web.config? This will be running on an intranet only so
the
security is less of an issue.
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.

Animadverto est verus


"Nicholas Paldino [.NET/C# MVP]" wrote:
Rik,

If you are using .NET 1.1 and earlier, you can check out the classes
in
the System.Web.Mail namespace. If you are using a beta of 2.0, or will
adopt 2.0 soon, look at the System.Net.Mail namespace.

You can also take a look at the Indy Project
(http://www.indyproject.org/), as they have classes that can send email.

Whatever solution you use, you will have to change the user that the
page runs under. By default, it is ASPNET, and does not have rights to
access the network. You might want to impersonate a user in your page
while
you send the email (which can be done through the WindowsIdentity class),
or
change the identity that all pages in the app run under (through
web.config). Of course, the latter is easier to config, but much more
dangerous.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rik Brooks" <rb*****@hhcc.com.donotspam> wrote in message
news:30**********************************@microsof t.com...
>I have an asp.net app with C# as the code behind. When a user changes
>the
> 'status' (the app has a work-flow feature) of a purchase order I need
> to
> perhaps send an email to a known address.
>
> Thus, if the po is new and the user changes it to 'submitted' then I
> need
> to
> send an email to the guy in charge of accepting or rejecting purchase
> orders.
> It doesn't have to be from the person that submitted the po, but it has
> to
> indicate the po # (which I have).
>
> Could somebody point me to some documentation where I can figure out
> how
> to
> write a server side object that allows me to send emails
> programatically?
> --
> ----------------------------------------
> Magic is not in the hands of the magician but in the mind of the
> audience.
>
> Animadverto est verus
>
>


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: hicham | last post by:
Hi, I am looking for help, i would like to know how can i use the endian.h and config.h to convert compiled files under solaris from BIG-ENDIAN to compiled files LITTLE-ENDIAN. I am working...
72
by: Herbert | last post by:
I'm still relativey new to stylesheets, so I'm hoping that the way I'm going about things can be seriously improved upon, i.e . I just haven't undersood something obvious about the 'cascading'...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
11
by: DamonChong | last post by:
Hi, I am new to c++. I recently spend an enormous among of time troubleshooting a seeminly innocuous piece of code. Although I narrow down this piece of code as the culprit but I don't...
13
by: jm | last post by:
I am trying to use datepart to get the real name of the month like "April" or "APR" not just "4." I could not find it in the documentation. Sorry. Thank you.
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
12
by: sam | last post by:
hi all, i'm starting to put together a program to simulate the performance of an investment portfolio in a monte carlo manner doing x thousand iterations and extracting data from the results. ...
31
by: Sam of California | last post by:
Is it accurate to say that "the preprocessor is just a pass in the parsing of the source file"? I responded to that comment by saying that the preprocessor is not just a pass. It processes...
3
by: Untitled123 | last post by:
Hey guys!! I am Planning on Creating a Computer vs. User Chess game involving Artificial Intelligence... by just using TURBO C++ This is NOT impossible!! Please understand that my seniors...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.