473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Display Name not showing up in Outlook for FROM Addresses

Hi,

I m creating a mail object and setting the FROM address to it as follows:

MailMessage objMail = new MailMessage();
objMail.From = new MailAddress("TestFrom@gmail.com");

When I look at the mail in OutLook, display name is not set for FROM address. It always shows the complete email ID. But for TO and CC addresses, display names are showing up correctly. (My Outlook has all display names configured, since it is showing up display name for TO addresses)

objMail.To.Add(new MailAddress("TestMail@gmail.com"));

Is there something different between FROM and TO addresses I m missing.

Please Help !! Urgent !!
Sep 19 '11 #1
3 14112
PianoMan64
374 Expert 256MB
Hey ksgsharma,

I have a few questions about how you're sending the email:

1. Are you having the application send an email using a Network resource (i.e. Exchange) or are you sending email using POP3 or some account that you're logging into (i.e. GMAIL.COM using POP3 access with username and password.)

2. if you are using Exchange, It doesn't care nor will it try to resolve the name for you when you send an email using Exchange to an email account. It will display it as you type it in your .FROM property. If you want it to display a certain way, then you need to format your string value to be "<DISPLAY NAME>email@domainname.com".

3. if you are sending from POP3 account to another email, You will have to employ the same method mentioned in option 2 in order to send your emails with a display name.

Hope that helps,

Expand|Select|Wrap|Line Numbers
  1. objMail.From = new MailAddress("<DisplayName>EmailAddress@domain.com");
  2.  
Sep 21 '11 #2
Plater
7,872 Expert 4TB
If you create the email in outlook (not in code) and change the from address, does it use the display name or full email name?
Sep 27 '11 #3
Thanks guys .. I used this to resolve the issue:

objMail.From = new MailAddress("<DisplayName>EmailAddress@domain.com" );

Sorry for delayed response.
Nov 10 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Daniel Pope | last post by:
Hello Everybody, I'm preparing for doing a daunting task: to access Out look Microsoft Outlook Express(regardles the operating system and Outlook version) from a Java applet (after the client...
1
by: Andrew Banks | last post by:
I'm sending mail message through asp.net and would like to display a "friendly name" in the from field as opposed to just an email address. When someone receives and email from me at the moment...
0
by: Ashraf Moollan www.ssw.com.au | last post by:
Hi All, When I do start>run and type "outlook", outlook launches successfully, even though the path to outlook isn't set. If I try to type in outlook in command prompt, outlook doesn't launch. ...
2
by: Mamatha | last post by:
Hi I don't know,is it correct form to post my query,but any know i want to clarify my query. I want to add a popup menu to Outlook from VB6.How can i add? please give me the solution. ...
4
by: John Bolanis via .NET 247 | last post by:
Hi to everyone I have a .NET application and i am trying to send emails using Outlook Object Model. When i do so, i get the following error : "File or assembly name Interop.Outlook, or one of...
1
by: James | last post by:
Is it possible that I can have a c# window service run under different display name?
11
by: mike_solomon | last post by:
Hi I have a link on a website that if you click opens up outlook <button onClick="location.href='mailto:a@b.com?subject=test subject'" > Select</button> Works fine But I want to include...
1
by: =?Utf-8?B?QmV4IGluIG5lZWQhIQ==?= | last post by:
Can anyone help! I am desperately trying to work out a electronic filing system for our companies emails and I would love to be able to add an automatic formatting to the From field to recognise...
5
by: jacc14 | last post by:
Please can anyone help. I am trying to add a button to a form which will pick up an email address, launch outlook, place the address in "Sendto" field and then let me manually type a letter. ...
5
by: Yas | last post by:
Hello, I have the following table with 4 columns.... firstname, lastname1, lastname2, EMAIL Table has user names and email, I would like to generate a 5th column called DisplayName. The email...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.