Solved

How to display Outlook mail signature by C# code?

Posted on 2011-02-16
3
2,653 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
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now