private static EmailAccount CreatePCRemoteEmailAccount() { var account = new EmailAccount { AccountName = "your email address", AccountPassword = "******", IsEnableSSL = true, Port = 587, SmtpServer = "smtp server", DisplayName = "PC遥控器" }; return account; }
public MailUtility(EmailAccount account) { _account = account; }
private CommandContext CreateCommandContext(string weiboId, IntPtr handle, EmailAccount account) { var context = new CommandContext { WeiboId = weiboId, WeiboService = _service, Handle = handle, SendPhotoByEmail = Settings.Default.SendPhotoByEmail, MailUtility = new MailUtility(account), To = Settings.Default.MyEmailAddress, DownloadPath = Settings.Default.DownloadPath }; return context; }