Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Sending email (ASP.NET 2.0)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jack - 30 Dec 2007 19:36 GMT
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.
Jack - 30 Dec 2007 19:46 GMT
PS:
I alreay have <mailSettings> configured 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 from=my@email.com>
   <network host="smtp.mydomain.com" password="password"
userName="username" />
  </smtp>
 </mailSettings>

> Hi,
>
[quoted text clipped - 5 lines]
>
> Tnx.
Cowboy (Gregory A. Beamer) - 31 Dec 2007 15:31 GMT
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.

Signature

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

*************************************************

| Think outside the box!

*************************************************
> PS:
> I alreay have <mailSettings> configured in web.config. I would like to use
[quoted text clipped - 18 lines]
>>
>> Tnx.
Mark Rae [MVP] - 30 Dec 2007 20:16 GMT
> I would like to know what is the "best-practice-way" of sending email from
> asp.net (VbScript).

http://www.systemnetmail.com/

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Peter Bromberg [C# MVP] - 30 Dec 2007 23:45 GMT
You must mean VB.NET, not "VbScript" -- correct?
Signature

Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com 

> Hi,
>
[quoted text clipped - 4 lines]
>
> Tnx.
Jack - 31 Dec 2007 12:36 GMT
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.

> You must mean VB.NET, not "VbScript" -- correct?
>
[quoted text clipped - 8 lines]
>>
>> Tnx.
JoeP - 31 Dec 2007 21:35 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.