Click here to Skip to main content
15,882,017 members
Home / Discussions / C#
   

C#

 
GeneralRe: FEATURE_BROWSER_EMULATION for Class Addin Pin
Member 113215783-Jan-15 15:13
Member 113215783-Jan-15 15:13 
GeneralRe: FEATURE_BROWSER_EMULATION for Class Addin Pin
BillWoodruff3-Jan-15 15:35
professionalBillWoodruff3-Jan-15 15:35 
QuestionSearch options Database Pin
rattlerrFx3-Jan-15 6:38
rattlerrFx3-Jan-15 6:38 
AnswerRe: Search options Database Pin
DamithSL3-Jan-15 14:55
professionalDamithSL3-Jan-15 14:55 
GeneralRe: Search options Database Pin
rattlerrFx3-Jan-15 15:15
rattlerrFx3-Jan-15 15:15 
QuestionProblem sending bulk mails with multiple attachments. Pin
Member 108281323-Jan-15 5:09
Member 108281323-Jan-15 5:09 
AnswerRe: Problem sending bulk mails with multiple attachments. Pin
Richard MacCutchan3-Jan-15 5:17
mveRichard MacCutchan3-Jan-15 5:17 
QuestionEmailing Image To Tumblr Pin
JBHowl3-Jan-15 1:12
JBHowl3-Jan-15 1:12 
Hello,

I'm trying to email images to my tumblr blog. I can go into my live account, create an email, attach an image and send it -- this works fine and post to my tubmlr blog fine. However, when I try to to do the same thing in my C# application nothing happens, no error, and nothing post to tumblr. I was hoping somebody could give me some insight as to what live.com does differently than me when sending email. My code is below, thanks in advanced.

C#
SmtpClient smtpClient = new SmtpClient();
               NetworkCredential basicCredential = new NetworkCredential("myliveaccount@live.com", "mylivepass");
               MailMessage message = new MailMessage();
               MailAddress fromAddress = new MailAddress("myliveaccount@live.com");

               // setup up the host, increase the timeout to 5 minutes
               smtpClient.Host = "smtp.live.com";
               smtpClient.UseDefaultCredentials = false;
               smtpClient.Credentials = basicCredential;
               smtpClient.Timeout = (60 * 5 * 1000);
               smtpClient.EnableSsl = true;

               message.From = fromAddress;
               message.Subject = "subject";

               message.IsBodyHtml = false;
               message.Body = "#Tag1 #Tag2 #Tag3 #Tag4";
               message.To.Add("tumblrblogemail@tumblr.com");

               string attachmentFilename = @"C:\0103150633034149.jpg";
               Attachment attachment = new Attachment(attachmentFilename, MediaTypeNames.Application.Octet);
               ContentDisposition disposition = attachment.ContentDisposition;
               disposition.CreationDate = File.GetCreationTime(attachmentFilename);
               disposition.ModificationDate = File.GetLastWriteTime(attachmentFilename);
               disposition.ReadDate = File.GetLastAccessTime(attachmentFilename);
               disposition.FileName = Path.GetFileName(attachmentFilename);
               disposition.Size = new FileInfo(attachmentFilename).Length;
               disposition.DispositionType = DispositionTypeNames.Attachment;
               message.Attachments.Add(attachment);

               smtpClient.Send(message);

AnswerRe: Emailing Image To Tumblr Pin
DamithSL3-Jan-15 1:31
professionalDamithSL3-Jan-15 1:31 
GeneralRe: Emailing Image To Tumblr Pin
JBHowl3-Jan-15 1:45
JBHowl3-Jan-15 1:45 
SuggestionRe: Emailing Image To Tumblr Pin
Richard MacCutchan3-Jan-15 1:54
mveRichard MacCutchan3-Jan-15 1:54 
AnswerRe: Emailing Image To Tumblr Pin
JBHowl3-Jan-15 3:56
JBHowl3-Jan-15 3:56 
GeneralRe: Emailing Image To Tumblr Pin
Richard MacCutchan3-Jan-15 5:15
mveRichard MacCutchan3-Jan-15 5:15 
GeneralRe: Emailing Image To Tumblr Pin
Dave Kreskowiak3-Jan-15 8:24
mveDave Kreskowiak3-Jan-15 8:24 
GeneralRe: Emailing Image To Tumblr Pin
JBHowl5-Jan-15 4:19
JBHowl5-Jan-15 4:19 
GeneralRe: Emailing Image To Tumblr Pin
Dave Kreskowiak5-Jan-15 4:41
mveDave Kreskowiak5-Jan-15 4:41 
GeneralRe: Emailing Image To Tumblr Pin
JBHowl6-Jan-15 3:43
JBHowl6-Jan-15 3:43 
AnswerRe: Emailing Image To Tumblr Pin
JBHowl10-Jan-15 2:48
JBHowl10-Jan-15 2:48 
QuestionTrouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 0:46
Mandelnuss3-Jan-15 0:46 
AnswerRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Richard MacCutchan3-Jan-15 0:57
mveRichard MacCutchan3-Jan-15 0:57 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 1:18
Mandelnuss3-Jan-15 1:18 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Richard MacCutchan3-Jan-15 1:50
mveRichard MacCutchan3-Jan-15 1:50 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 3:53
Mandelnuss3-Jan-15 3:53 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Richard MacCutchan3-Jan-15 4:46
mveRichard MacCutchan3-Jan-15 4:46 
GeneralRe: Trouble handling DeviceIoControl to retrieve USN data Pin
Mandelnuss3-Jan-15 5:20
Mandelnuss3-Jan-15 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.