Results 1 to 8 of 8

Thread: Sending mail

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Sending mail

    Hey,

    I have an application that will be deployed to customers.
    I want to be able to allow them to send me an e-mail from within the application via a submit form.

    The requirement would obviously be that they are connected to the web.

    How would I go about that?

    I know I can use the web.mail classes to do that but that requires me to specify a SMTP server. Is there another way?
    Also, the typical user will not have IIS installed etc... so their connection is all I would have to work with.
    They might be able to provide me with the POP and SMTP servers as well.

    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Sending mail

    You can specifiy any SMTP server you have access to, so if I have an account with SomeISP and my e-mail address is [email protected] then I can specify the SMTPServer as smtp.someisp.com and away it goes. The alternative is to call Process.Start and pass it a mailto URL, which will open a new message in the user's default e-mail client. The advantage of this method is that the user then has a copy of the message in their standard Sent Items folder.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Hyperactive Member nothingofvalue's Avatar
    Join Date
    Jul 2005
    Location
    Arizona
    Posts
    489

    Re: Sending mail

    There is a specific form mail example in the 101 Examples I believe.
    "Imagination is more important than knowledge..."

    Albert Einstein
    -----------------------------------------------
    If my reply helped you then you really were lost, but I still took the time to help, please rate it anyway

  4. #4

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Re: Sending mail

    I've tried that. smtp.someisp.com but I got an error
    Could not access cdo.message.

    Thanks,
    Don't anthropomorphize computers -- they hate it

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Sending mail

    You didn't really use "smtp.someisp.com" did you? That was just an example. You need to use the SMTP server address for an ISP you have an account with. Look up the details of your mail servers in your e-mail client and you should have an SMTP server in there. You can use that, but obviously your clients should use the SMTP server for their own ISP. You need to code your app so that the user can provide an SMTP server and then your app will use that value automatically. The logical place would be the config file. The following link provides a method for storing and retrieving information using the config file: http://msdn.microsoft.com/library/de...alBasicNET.asp
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Re: Sending mail

    hehe, no I didn't use smtp.someisp.com

    I used my ISP's smtp server but still received the error message.
    Don't anthropomorphize computers -- they hate it

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Sending mail

    Quote Originally Posted by vbgladiator
    hehe, no I didn't use smtp.someisp.com
    Phew. I've seen a number of people report CDO errors when trying to send mail and I've never actually seen anyone post a specific resolution. I really don't know what causes those errors.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Re: Sending mail

    yeah, I googled it but the info is very vague.

    Thanks for your help anyways,
    Don't anthropomorphize computers -- they hate it

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