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 8577685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:12:56+00:00 2026-06-11T20:12:56+00:00

Not sure if this question has been asked elsewhere… For a website project that

  • 0

Not sure if this question has been asked elsewhere…

For a website project that I’m working on, I created an ASPX web form that will send an email containing the contents of the form on button click. I tried it and it worked when I’m using the Yahoo SMTP server and testing using my personal Yahoo email address (+ specifying the username and password).

However, it wouldn’t work when I’m using the SMTP server for mail messages for the website (after I’ve created a new admin email account in the website).

The website is up and running and I’m able to send an email to the website’s admin email account (through Yahoo) but just not when sending through the ASPX web form.

Here is the code for using the Yahoo SMTP server and it works fine:

    SmtpServer.Credentials = New Net.NetworkCredential("username@yahoo.com", "password")
    SmtpServer.Port = "25"
    SmtpServer.Host = "smtp.mail.yahoo.com"
    mail.From = New MailAddress("username@yahoo.com")
    mail.To.Add("username@yahoo.com")
    mail.Subject = "RE: Message Subject"
    mail.Body = "Message goes here."
    SmtpServer.Send(mail)

Now, here is the code for using my website’s SMTP server which doesn’t work:

    SmtpServer.Port = "25"
    SmtpServer.Host = "127.0.0.1"
    mail.From = New MailAddress("admin@awesomewebsite.org.au")
    mail.To.Add("admin@awesomewebsite.org.au")
    mail.Subject = "RE: Message Subject"
    mail.Body = "Message goes here."
    SmtpServer.Send(mail)

These are the correct port and host numbers given by the web hosting company that hosts the website. They also said that username and password are not needed. I also tried appending this to the beginning of the code but it still wouldn’t work:

    SmtpServer.Credentials = New Net.NetworkCredential()

or even

    SmtpServer.Credentials = New Net.NetworkCredential("", "")

I really don’t know what to do. Please help this newbie out. Any response is appreciated.

By the way, the error message that I get when I test this out appears in a message box: “Failure sending mail.”

  • 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-06-11T20:12:57+00:00Added an answer on June 11, 2026 at 8:12 pm

    You need to create an email account in your web site and use those credentials to send the mail just as you did with yahoo (This can be done in your admin portal of the website but some hosting providers will charge you separately for the email service). Further more the correct smtp server is also should be given, that depends on your hosting provider. You can get that information from your hosting provider. 127.0.0.1 will not work here anyway.

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

Sidebar

Related Questions

I'm not sure if this question has been asked before but are there any
Alright, I'm not sure if this question has been asked before so if it
[I'm not sure if this question has been asked, though I've looked around a
So, if this question has been asked before, I'm sorry. I'm not exactly sure
I'm not sure if this question has been asked before, but I can't seem
I'm not sure if this question has been asked before but what are the
I'm sure this question has been asked before, my apologies for not finding it
I'm sure that this question has been asked before but I've been unable to
I'm not sure if this question has been either asked or quite possibly already
I'm 10000000% sure that this question has been asked before, however, the majority of

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.