locked
Send to email? RRS feed

  • Question

  • Is there a way to send the data to my email? I'm doing a WFA that is a survey and I can send it to people who can do it and send the data back to my email so I can analyse it.
    Samuel - Student - Newbie :]
    Thursday, May 13, 2010 11:06 AM

Answers

  • You cna use this method to send mail using any smtp provider, I've used Gmail as an example :

    http://quizwith.net/blog/send-email-using-gmail/


    Thanks

    "Feel the Force !"  | My blog
    Thursday, May 13, 2010 8:43 PM
  • Try this

    Dim Email as new System.Net.Mail.MailMessage("myemail@my.com","youremail@your.com")

    Email.Subject = textbox1.text

    Email.Body = Richtextbox1.text

     

    Dim x as new System.Net.Mail.StmpClient("smtp.sample.com")

    Dim net as new System.Net.NetworkCredentials("myemail@my.com","mypassword")

     

    x.Credentials = net

    x.send(Email)


    3 stars and a sun
    • Proposed as answer by pinoyz Wednesday, May 19, 2010 6:57 AM
    • Marked as answer by Martin_XieModerator Thursday, May 20, 2010 8:26 AM
    Wednesday, May 19, 2010 6:57 AM

All replies

  • You cna use this method to send mail using any smtp provider, I've used Gmail as an example :

    http://quizwith.net/blog/send-email-using-gmail/


    Thanks

    "Feel the Force !"  | My blog
    Thursday, May 13, 2010 8:43 PM
  • Thanks Ill try it back at home. School blocked everything >.> Its lucky they haven't blocked this site :]
    Samuel - Student - Newbie :]
    Thursday, May 13, 2010 11:12 PM
  • What do I put in the "SMTPServer.Credentials = New System.Net.NetworkCredential("username", "password")"

    Samuel - Student - Newbie :]
    Monday, May 17, 2010 12:00 PM
  • you've gmail account ? if not, create one. put that email address and password.

    Its not necessary to be gmail account. Any email service that gives you SMTP access is fine. Only settings that will change are smtp host name [server name] and port number. Details are usually given by service provider in their Help documents.


    Thanks

    My blog
    Living on Earth may be expensive, but did you know that it includes a free trip around the sun? Isn't that worth it?
    Monday, May 17, 2010 3:56 PM
  • Samuel,

    As addition to the answer from Omnie,

    This is in my idea the best website about system.net.mail

    http://www.systemnetmail.com/


    Success
    Cor
    Tuesday, May 18, 2010 6:32 AM
  • What do I put in the "SMTPServer.Credentials = New System.Net.NetworkCredential("username", "password")"

    Samuel - Student - Newbie :]

    You should design your application so that the user sets up an email provider with which to send the email . If you put your username and password then they will actually be sending email as you . Set up your app so the "To" is set to your email address and that is all . If you do what you seem to be doing then using something like reflector a person can get your email provider , username and password and impersonate you to send spam or worse a virus .
    Coding4fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read . Or use the Forum Code Formatter by JohnWein http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/bf977a14-d9d4-4e84-9784-bf76b9e23261
    Tuesday, May 18, 2010 7:13 AM
  • So I should let the user input SMTPServer.Credentials = New System.Net.NetworkCredential("username", "password"?

    Samuel - Student - Newbie :]
    Tuesday, May 18, 2010 8:10 AM
  • Mostly you can leave that blank, it is the same as you set your credentials when you connect outlook to the mail server of your provider.

    Did you've a look at the link I showed?


    Success
    Cor
    Tuesday, May 18, 2010 9:46 AM
  • Try this

    Dim Email as new System.Net.Mail.MailMessage("myemail@my.com","youremail@your.com")

    Email.Subject = textbox1.text

    Email.Body = Richtextbox1.text

     

    Dim x as new System.Net.Mail.StmpClient("smtp.sample.com")

    Dim net as new System.Net.NetworkCredentials("myemail@my.com","mypassword")

     

    x.Credentials = net

    x.send(Email)


    3 stars and a sun
    • Proposed as answer by pinoyz Wednesday, May 19, 2010 6:57 AM
    • Marked as answer by Martin_XieModerator Thursday, May 20, 2010 8:26 AM
    Wednesday, May 19, 2010 6:57 AM