|
-
Nov 27th, 2015, 11:34 PM
#1
Thread Starter
Junior Member
Question about sending hushmail email via vb.net.
Hey coders,i have make email senders in the past with gmail. After many frustrating error messages i was able to change a gmail setting allowing "use of unsecure apps" on my gmail security settings. Now i am trying to send email with my hushmail.com account. I googled their smtp and found them here https://help.hushmail.com/entries/24...ames-and-ports. So i inerted my login info andhushmail smtp stuff where gmails used to be in this code here
Try
Dim SmtpClient As New SmtpClient("smtp.gmail.com", 587)
SmtpClient.Credentials = New Net.NetworkCredential("Your Email Login", "Your Email Password")
SmtpClient.EnableSsl = True
emailmessage.From = New MailAddress("From Email Address")
emailmessage.To.Add("Email Address Being Sent To")
emailmessage.Subject = ("Enter Subject Here")
emailmessage.Body = ("Enter Body Here")
SmtpClient.Send(emailmessage)
MessageBox.Show("Email Sent Successful")
Catch ex As System.Net.Mail.SmtpException
Dim code As System.Net.Mail.SmtpStatusCode = ex.StatusCode
MessageBox.Show(ex.ToString + " : " + code.ToString)
End Try
Tomarow when i login to my computer i can post the actual error message but i think it has something to do with me not being logged in. Can anybody give me some pointers on some setting i might need to import.thanks
-
Nov 28th, 2015, 08:51 AM
#2
Re: Question about sending hushmail email via vb.net.
So i inerted my login info andhushmail smtp stuff where gmails used to be in this code here
Read this sentence again, then compare your code to the reality it describes. You'll find a discrepancy.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
-
Nov 28th, 2015, 10:53 AM
#3
Thread Starter
Junior Member
Re: Question about sending hushmail email via vb.net.
 Originally Posted by Sitten Spynne
Read this sentence again, then compare your code to the reality it describes. You'll find a discrepancy.
not sure what you ment but here is the code i used Try
Dim SmtpClient As New SmtpClient("smtp.hushmailmail.com", 587)
SmtpClient.Credentials = New Net.NetworkCredential("my hushmail username", "my hushmail password")
SmtpClient.EnableSsl = True
emailmessage.From = New MailAddress("my hushmail adress")
emailmessage.To.Add("my gmail")
emailmessage.Subject = ("textbox11.text)
emailmessage.Body = (textbox2.text)
SmtpClient.Send(emailmessage)
MessageBox.Show("Email Sent Successful")
Catch ex As System.Net.Mail.SmtpException
Dim code As System.Net.Mail.SmtpStatusCode = ex.StatusCode
MessageBox.Show(ex.ToString + " : " + code.ToString)
End Try
-
Nov 28th, 2015, 11:30 AM
#4
Thread Starter
Junior Member
Re: Question about sending hushmail email via vb.net.
here is my error
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|