locked
How to create custom <file_name>.eml file in C# RRS feed

  • Question

  • User956554041 posted

    Hi, 

    I am creating a .eml file using SmtpClient in C#, look into the code<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>"smtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;<o:p></o:p>     smtpClient.PickupDirectoryLocation = <Location where we want to save .eml file>e.g c:\email;<o:p></o:p>     smtpClient.EnableSsl = false;<o:p></o:p>     smtpClient.Send(mailMessage);"<o:p></o:p><o:p> </o:p>When i send the mail it creates a file with a eml extension and stores it in that folder, this I have done.<o:p></o:p>but it store .eml file with name something like <1dccaa25-c76c-4e47-9e36-2bd04bf89db5.eml> i.e GUID, i want to give custom name to this .eml file.<o:p></o:p><o:p> </o:p>Any help would be appreciated

    Regards,

    Dheeraj

    Friday, November 28, 2008 2:10 AM

Answers

  • User-1136466523 posted

    Hi,

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    Based on my knowledge, EML files are used by Outlook and other E-mail clients as well, it’s also produced by those mail clients. And you cannot name those files in your custom way.

    <o:p> </o:p>

    Thanks.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 3, 2008 12:20 AM

All replies

  • User-1136466523 posted

    Hi,

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    Based on my knowledge, EML files are used by Outlook and other E-mail clients as well, it’s also produced by those mail clients. And you cannot name those files in your custom way.

    <o:p> </o:p>

    Thanks.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 3, 2008 12:20 AM
  • User956554041 posted

     

    Hey Thanks a lot.

    May be I will be better of using the Folder hierarchy for the purpose of distinguishing them.

    Wednesday, December 3, 2008 12:32 AM
  • User-920655679 posted

    Hi,

    Check this article: http://www.codeproject.com/KB/IP/smtpclientext.aspx?msg=2876398 

    Tuesday, October 20, 2009 1:35 AM