473,396 Members | 1,804 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,396 software developers and data experts.

Sending email (ASP.NET 2.0)

Hi,

I am still new to .NET so, i'm sorry if my question is a bit too simple :-)

I would like to know what is the "best-practice-way" of sending email from
asp.net (VbScript). I want to make a "contact us" page for my website.

Tnx.
Dec 30 '07 #1
6 1820
PS:
I alreay have <mailSettingsconfigured in web.config. I would like to use
these settings to send mail instead of defining smtp server and credentials
in aspx or source page:

<mailSettings>
<smtp fr*****@email.com>
<network host="smtp.mydomain.com" password="password"
userName="username" />
</smtp>
</mailSettings>

"Jack" <no@sp.amwrote in message
news:eT**************@TK2MSFTNGP06.phx.gbl...
Hi,

I am still new to .NET so, i'm sorry if my question is a bit too simple
:-)

I would like to know what is the "best-practice-way" of sending email from
asp.net (VbScript). I want to make a "contact us" page for my website.

Tnx.

Dec 30 '07 #2
"Jack" <no@sp.amwrote in message
news:eT**************@TK2MSFTNGP06.phx.gbl...
I would like to know what is the "best-practice-way" of sending email from
asp.net (VbScript).
http://www.systemnetmail.com/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 30 '07 #3
You must mean VB.NET, not "VbScript" -- correct?
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"Jack" wrote:
Hi,

I am still new to .NET so, i'm sorry if my question is a bit too simple :-)

I would like to know what is the "best-practice-way" of sending email from
asp.net (VbScript). I want to make a "contact us" page for my website.

Tnx.
Dec 30 '07 #4
Hi Peter,

Yes, its correct. Sorry for the mistake, just trying to upgrade myself from
classic asp to .net :-)

I have found solution to my problem.

Rgds.

"Peter Bromberg [C# MVP]" <pb*******@yahoo.NoSpamMaam.comwrote in message
news:73**********************************@microsof t.com...
You must mean VB.NET, not "VbScript" -- correct?
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"Jack" wrote:
>Hi,

I am still new to .NET so, i'm sorry if my question is a bit too simple
:-)

I would like to know what is the "best-practice-way" of sending email
from
asp.net (VbScript). I want to make a "contact us" page for my website.

Tnx.

Dec 31 '07 #5
You are missing the deliveryMethod attribute on the smtp tag. This can be
set to network, pickupDirectoryFromIis and specifiedPickupDirectory (which
you would have to state). In general, you will use network here. I am not
completely sure this is mandatory, but I always include it in my config.

The next thing to check is to ensure your smtp server/service allows you to
use it from this server. Since you are not using the local SMTP server, you
could have restrictions on the server you are using that does not allow you
to send messages through here.

In fact, if you are literally using my@email.com as your address, it is
likely you are being restricted as most servers will automatically filter
out messages from other domains. I would assume you are just using this as a
marker, so I will not go into too much detail. Just make sure the SMTP
server and the address are the same domain or have a network admin allow
from the other domain.

I personally prefer sending directly through our corporate exchange server,
but this may not be an option you have. It is really no different than SMTP,
as far as setup, but I have more troubleshooting ability.

With your SMTP server, you can examine the dump box (bad email box) and see
if your messages are getting stuck in there. If so, you have a configuration
problem on the SMTP server end. If, instead, you are receiving an error in
your code, you should post it.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Jack" <no@sp.amwrote in message
news:ev**************@TK2MSFTNGP05.phx.gbl...
PS:
I alreay have <mailSettingsconfigured in web.config. I would like to use
these settings to send mail instead of defining smtp server and
credentials in aspx or source page:

<mailSettings>
<smtp fr*****@email.com>
<network host="smtp.mydomain.com" password="password"
userName="username" />
</smtp>
</mailSettings>

"Jack" <no@sp.amwrote in message
news:eT**************@TK2MSFTNGP06.phx.gbl...
>Hi,

I am still new to .NET so, i'm sorry if my question is a bit too simple
:-)

I would like to know what is the "best-practice-way" of sending email
from asp.net (VbScript). I want to make a "contact us" page for my
website.

Tnx.


Dec 31 '07 #6
Hi All,

Need to check if the propery of an object exits.

oMyObject.Message

In some cases the Message property may not exists. I know the GetType() can
do it.
How would you check it?

Thanks,

Joe
Dec 31 '07 #7

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

Similar topics

4
by: Nathan Sokalski | last post by:
I have a form which will be processed by being sent to an ASP page. I would like the ASP page to take the data from the Request.QueryString (which I know how to do) and format it so I can have it...
3
by: Serge Myrand | last post by:
Hi everybody, The following code for sending email (found on msn I think) works find when used in a .VBS file. I double click the file and the mail is send. When I use the same code in my .ASP...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
1
by: festivalman | last post by:
Hi, sorry if this is in the wrong spot. Finding the newsgroups on MS's site could have been easier Here's my problem I've got some old asp's that are running our simple web site. In a section,...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
1
by: Joe | last post by:
Hi, I know this is a asp.net newsgroup but may be most you know asp very well. I am sending an email from an asp page. Besides sending an email to sender, I am sending myself a BCC also. Out...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
4
by: Roger Withnell | last post by:
I'm sending Russian text in an email generated from the website which displays in the email as ?????????? The website is set to codepage 65001 and the charset to utf-8. Please advise. ...
7
by: Ray Booysen | last post by:
Hi all I'm sending email via ASP.NET in HTML mode. Each email has exactly one attachment and I do have full access to the SMTP server. However, if I send the email in HTML format, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.