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

  • Home
  • SEARCH
  • 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 149173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:05:19+00:00 2026-05-11T09:05:19+00:00

The following function works perfectly: protected void SendWebMailMessage(string DisplayName, string From, string ReplyTo, string

  • 0

The following function works perfectly:

    protected void SendWebMailMessage(string DisplayName, string From, string ReplyTo,         string To, string Subject, string Body, string Attachments)     {         System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();         msg.Fields.Add('http://schemas.microsoft.com/cdo/configuration/smtpserver',              'smtpout.secureserver.net');         msg.Fields.Add(              'http://schemas.microsoft.com/cdo/configuration/smtpserverport', 25);         msg.Fields.Add('http://schemas.microsoft.com/cdo/configuration/sendusing',               2);         msg.Fields.Add(              'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate', 1);         msg.Fields.Add(              'http://schemas.microsoft.com/cdo/configuration/sendusername', From);         msg.Fields.Add(              'http://schemas.microsoft.com/cdo/configuration/sendpassword',              mailpassword);         msg.To = To;         msg.From = DisplayName + '<' + From + '>';         msg.BodyFormat = MailFormat.Html;         msg.Subject = Subject;         msg.Body = Body;         msg.Headers.Add('Reply-To', ReplyTo);         SmtpMail.SmtpServer = 'smtpout.secureserver.net';         SmtpMail.Send(msg);     } 

However, I get a build warning telling me that System.Web.Mail is obsolete, and that I should be using System.Net.Mail. So I used System.Net.Mail, and I came up with the following function to replace my old one:

    protected void SendNetMailMessage(string DisplayName, string From, string ReplyTo,          string To, string Subject, string Body, string Attachments)     {         MailAddress addrfrom = new MailAddress(From, DisplayName);         MailAddress addrto = new MailAddress(To);         MailAddress replytoaddr = new MailAddress(ReplyTo);         System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();         msg.From = addrfrom;         msg.To.Add(addrto);         msg.ReplyTo = replytoaddr;         msg.IsBodyHtml = true;         SmtpClient smtp = new SmtpClient('smtpout.secureserver.net');         smtp.Credentials = new NetworkCredential(From, mailpassword);         smtp.Send(msg);     } 

I don’t get any exceptions or errors, but my message never goes through. Can anyone tell me what I might be doing wrong? Thanks in advance.

  • 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. 2026-05-11T09:05:19+00:00Added an answer on May 11, 2026 at 9:05 am

    If I’m not wrong… you are using the Goddady hosting. I’m also using it… and I have **relay-hosting.secureserver.net** as the SMTP server. I don’t know… may be can be something like that… or you have not set the Relay in your console.

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

Sidebar

Related Questions

I used the following function I found online and it works perfectly. However, when
I have the following Javascript code that works perfectly: $(document).ready(function() { $(#Select1).setDefault(); $(#Select2).setDefault(); $(#Select3).setDefault();
I am using Hovercard and it works perfectly with the following code: $.getJSON(userjson.php function(result){
The following function works perfectly on our production site function flickrGetPhotos(){ $.getJSON(http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key= + flickrApiKey
The following simple jQuery function works perfectly on Mozilla Firefox(5.0) but doesn't work on
following code works perfectly on FF and Chrome but not in IE8. $(window).keyup(function(e) {
I have the following which works perfectly $(function() { // Create the chart chart
I need to check if an object contains any value. The following function works
I have the following function that works properly in Chrome and Firefox, but not
I have the following function which works very well within a $(document).ready(function(){ $('.threadWrapper >

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.