Solved

How to display Outlook mail signature by C# code?

Posted on 2011-02-16
3
3,002 Views
Last Modified: 2012-05-11
Hi, I wrote below code to send a mail by C# and working very well.
---------------------------------------------------------------------------------------------------------          
SmtpClient SmtpServer = new SmtpClient("someexch06.domain.com");
MailMessage mail = new MailMessage();
mail.From = new MailAddress("abc@domain.com");
mail.To.Add("xyz@domain.com");
mail.CC.Add("rtyy3kkf@domain.com");
mail.Subject = "Documents Update";
mail.Body = "Please update  your documents";
SmtpServer.Port = 25;
SmtpServer.Credentials = new System.Net.NetworkCredential("abc", "password");
SmtpServer.Send(mail);
--------------------------------------------------------------------------------------------------
Now I also want to display Outlook mail signature in that generated mail.
How to do?  

Signature should be like below:
Sender Name | Designation | Company Name |
Address | State | Country |
Mobile | Tele Phone |
Email | www.dferttrt.com|

Whenever any user form our domain send mails from Outlook above signature come automatically. The same I want from code.

Kindly help.  
0
Comment
Question by:prdeshpande
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Assisted Solution

by:s_chilkury
s_chilkury earned 166 total points
ID: 34913866
You can find the Outlook signature in the following registry path:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000013

Note: the path may slightly vary
0
 
LVL 3

Accepted Solution

by:
imaki06 earned 167 total points
ID: 34913873
Signature is something that the client(outlook) adds to the mail. If you send the mail with your own client, you are responsible to add that signature by yourself.

So add the signature to the mail.Body

Like:
mail.Body = "Please update  your documents" + signature; //signature is a string, that contains your signature
0
 
LVL 11

Assisted Solution

by:SAMIR BHOGAYTA
SAMIR BHOGAYTA earned 167 total points
ID: 34914188
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question