Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to display Outlook mail signature by C# code?

Posted on 2011-02-16
3
Medium Priority
?
3,258 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 664 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 668 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 668 total points
ID: 34914188
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Loops Section Overview

885 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