Email Error

Topics: General, Installing BugNET
Sep 6, 2012 at 6:16 AM

How can fix below error message?

System.Net.Mail.SmtpException: ??????? ---> System.IO.DirectoryNotFoundException: ??????“D:\Projects\Email\39b4395e-3948-4de6-9550-94b3ae4050b3.eml”?????     ? System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)     ? System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)     ? System.IO.FileStream..ctor(String path, FileMode mode)     ? System.Net.Mail.SmtpClient.GetFileMailWriter(String pickupDirectory)     ? System.Net.Mail.SmtpClient.Send(MailMessage message)     --- ??????????? ---     ? System.Net.Mail.SmtpClient.Send(MailMessage message)     ? BugNET.BusinessLogicLayer.Mail.SendMail(String to, String from, String subject, String body, Encoding bodyEncoding, MailPriority priority, MailFormat bodyFormat, String smtpServer, Int32 smtpPort, Boolean smtpUseSSL, Boolean smtpAuthentication, String smtpUsername, String smtpPassword) ?? E:\downCode\BugNET-0.7.881-Source\src\BugNET_WAP\Old_App_Code\BLL\Mail.cs:?? 216

Developer
Sep 6, 2012 at 2:51 PM

What this means is the folder "D:\Projects\Email\" does not exist so you must manually create it.

If you are trying to get the email notifications working please read http://bugnet.codeplex.com/wikipage?title=Configuring%20Email%20Notifications&referringTitle=Documentation

If you are running the code in visual studio and or testing the app and want the emails to be written to a folder instead then you will need to read up on the mailSettings http://msdn.microsoft.com/en-us/library/w355a94k(v=vs.100).aspx

and look for settings in the web.config like this

<mailSettings>
	<smtp deliveryMethod="SpecifiedPickupDirectory">
		<specifiedPickupDirectory pickupDirectoryLocation="D:\Projects\Email" />
	</smtp>
</mailSettings>