CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    69

    sending email from asp.net c#

    Hello Everyone,

    i have a question in regards to sending mail via asp.net.

    i am creating a web application that will, on clicking the submit button, send an email with a picture attachment to a distribution list. i know that i can easily send mail using the System.Web.Mail namespace but what if the person doesnt have a default SMTP service set up? is it possible to specify another SMTP service on another server to relay the messages through? i think i have done something similar in the past but i ran into a few security issues.

    is it possible to send an email without relying on SMTP? i have read a few ways to do this (using a service called BLAT) but it seems to cumbersome to really do efficiently, is there a way to do this through code?

    i am a bit stuck at the moment, as there are a few people suggesting a few different ways to do it, but i dont think that they are the best ways, can anyone help me out?

    regards
    adam

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto
    Posts
    805

    Re: sending email from asp.net c#

    using System.Web.Mail shouldn't depend on the users SMTP settings. It depends on your Servers smtp settings. So all you have to worry about is that the server has access to a SMTP server. For example. i have two web servers and one File Server. The File server has the MS IIS Smtp Virtual server set up on it. For any of my web apps that have to send mail i just use my File Server for the SMTP server. and it sends to anywhere. The only time you depend on a USERS settings is if you just do a mailto hyperlink like(mailto:[email protected]). That uses the client computer. But System.Net.Mail uses any SMTP server set by the web app.

    hth,
    mcm
    rate my posts!
    mcm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured