Solved

How to display Outlook mail signature by C# code?

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

737 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