Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7193191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:07:10+00:00 2026-05-28T20:07:10+00:00

When I try to send an email with Gmail using VB.Net or C# I

  • 0

When I try to send an email with Gmail using VB.Net or C# I keep getting the following message: Failure sending email – An attempt was made to access a socket in a way forbidden by its access permissions – Unable to access remote server.
I have tried using several Gmail accounts including VB.Net code that worked in the past, like the following:

Message = New MailMessage(Sender, Recipient, Subject, MessageBody)

SMTPServer = New SmtpClient("smtp.gmail.com", 587)'Port 465 fails as well
SMTPServer.EnableSsl = True

SMTPServer.Credentials = New NetworkCredential("Username@gmail.com", "password")
SMTPServer.Send(Message)

(I am aware that the web.config can be used for a lot of the above).

Obviously Gmail must have changed some setting or something similar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:07:11+00:00Added an answer on May 28, 2026 at 8:07 pm

    It was McAfee Anti-Virus preventing the sending of emails. Thanks for all the help, and sorry for wasting everyones time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send email through gmail using PHPMailer_V5.1. Getting the following error,
I need to send mail using Gmail SMTP, but it's showing Failure sending mail.
I am trying to send an email via GMail from ASP.Net using the code
When I try and send an email say me+test@gmail.com it throws (Net::SMTPSyntaxError) 501 5.1.3
I'm trying to send email to my site users (ASP.NET, VS2010), currently I'm using
I have following code which successfully sent email using Gmail address. But when i
i already know how to send a email using vb.net, however i cant figure
I am using mail message class to send an email. But if i check
i have downloaded Swift Mailer from their website and try to send simple email
Im getting a connection refused when I try to send some data to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.