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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:08:29+00:00 2026-05-17T00:08:29+00:00

I was trying to change FROM field with Name and Email address. But When

  • 0

I was trying to change FROM field with Name and Email address. But When I receive the email, Its shown as below

My network <commity@company.com [My network <commity@company.com]

Mycode is like below

    const string from = "My network <commity@company.com>";

    StringDictionary headers = new StringDictionary();
       headers.Add("to", invitee.userEmail);
       headers.Add("subject", ltEmailSubject.Text);
       headers.Add("from", from);
       headers.Add("content-type", MediaTypeNames.Text.Html);

       _emailSuccessful = SPUtility.SendEmail(elevatedSite.RootWeb, headers,
                          emailBody + Environment.NewLine + "");

I want FROM email address should showup like below

My network [commity@company.com]
  • 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-17T00:08:30+00:00Added an answer on May 17, 2026 at 12:08 am

    SPUtility.SendMail will always use the from smtp address as specified in Central Administration > Outgoing Email Settings and the friendly name is set to the title of the site.

    Instead you can use (from http://www.systemnetmail.com/faq/3.2.1.aspx)

    MailMessage mail = new MailMessage();
    
    //set the addresses
    //to specify a friendly 'from' name, we use a different ctor
    mail.From = new MailAddress("me@mycompany.com", "Steve James" );
    mail.To.Add("you@yourcompany.com");
    
    //set the content
    mail.Subject = "This is an email";
    mail.Body = "this is the body content of the email.";
    
    //send the message
    SmtpClient smtp = new SmtpClient("127.0.0.1");
    smtp.Send(mail);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to get information from a field and it's not recognizing the field name.
I am trying to get a field named BASVURUTARIHI(Date) from DataSet. But if I
I have the following code that i am trying to change from a regular
I'm trying to calculate percentage change from 2 columns. Since you will get an
I'm trying to do an svn merge of a change from trunk onto a
I'm trying to change the menu here from mouse over to a on click
I'm trying to change the will_paginate links from the format of /list?page=1 to /list/page/1
I'm trying to change the current directory from C: to Y: I tried: import
I am trying to change an XML file from one format to another and
I am trying to change the function call from the onclick event of a

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.