[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hey faggots I wrote some code and need some help with the last

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 40
Thread images: 3

File: Typing.jpg (57KB, 1280x720px) Image search: [Google]
Typing.jpg
57KB, 1280x720px
Hey faggots I wrote some code and need some help with the last bit. Ill post what I have so far. Here is what else I need:
Check messages
send messages
I am so done with this garbage C#
>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GmailClient
{
class Program
{ string userName;
string password;
static void Main(string[] args)
{
string userName = "";
string password = "";
loggedIn(userName);
userMenu();
}
public static void userMenu()
{
Console.WriteLine("_________Menu__________");
Console.WriteLine("Login");
Console.WriteLine("Check Messages");
Console.WriteLine("Send a Message");
Console.WriteLine("________________________");
}

public static bool loggedIn(string user)
{
if (user.Equals(String.Empty))
{

}
return true;

}
}
}
>>
File: image.webm (113KB, 1080x1445px) Image search: [Google]
image.webm
113KB, 1080x1445px
/thread
>>
you must be 18 to post here
>>
boomp
>>
>>56942534
>>56942554
see >>56942520
>>
bumpin some more
>>
>>56942589
see >>56942520
>>
What language?
>>
>>56942619
C#
>>
>>56942619
>>56942633
see >>56942520
>>
What is going on
>>
Some fag is spamming thread I guess
>>
Absolutely garbage code
>>
>>56942651
>>56942663
>>56942690
see >>56942520
>>
bump for fags
>>
plz someone.
>>
>>56942742
>>56942783
see >>56942520
>>
please someone help me i'm a little bitch that can't code for myself
>>
>>56942808
LOL
>>
another bump
>>
>>56942808
>>56942810
>>56942844
see >>56942520
>>
>>56942887
I dont c
>>
>>56943046
see >>56942520
>>
>>56942502

Why are you spamming asshole?

>>56942880
>>
>>56943332
Because I am home alone and have no cocks to suck. Deal with it. Also bump for help.
>>
>>56942519
you either put code tags and tell your problem and I MAYBE will decide to help you, or you fuck off
>>
>>56943429
>fuck you, help me
kill yourself
why would we help you if your attitude is so shit
>>
>>56945737
because OP didnt post that lol
>>
>>56944292
The problem is I need other actions with my program. They need to be able to select one of the actions and then I need them to be able to check their inbox and also send themselves a message.
>>
I am just trying to get this done. I am obviously shitty at coding.
>>
File: 1475691601331.gif (2MB, 320x240px) Image search: [Google]
1475691601331.gif
2MB, 320x240px
I bet you have an iPhone you cuck.

Drop out or find a real major
>>
>>56945944
Nope I have an android. Just trying to learn this shit.
>>
>>56944292
Thanks for actually offering
>>
Im OP Im a fag and I bump her der
>>
Just use this op

http://www.codeproject.com/Tips/291669/Send-mail-using-Google-Apps-Gmail-Account-using-Cs
>>
>>56946011
My Prof gave us some code like this. Thank you. Here is the code he gave us.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Net;
using System.Net.Mail;

namespace GmailClient
{
class Gmail
{
public static void sendMail(string userName, string password, string toAddy, string subject, string body)
{


MailAddress fromAddress = new MailAddress(userName);
MailAddress toAddress = new MailAddress(toAddy);

SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential(fromAddress.Address, password);

MailMessage message = new MailMessage(fromAddress, toAddress);
message.Subject = subject;
message.Body = body;

smtp.Send(message);

}

public static string[] getMail(string userName, string password)
{
System.Net.WebClient objClient = new System.Net.WebClient();
XmlNodeList nodelist;
XmlNode node;
string response;
XmlDocument xmlDoc = new XmlDocument();

Console.WriteLine("checking for mail...");
objClient.Credentials = new System.Net.NetworkCredential(userName, password);
response = Encoding.UTF8.GetString(objClient.DownloadData("https://mail.google.com/mail/feed/atom/"));
response = response.Replace(@"<feed version=""0.3"" xmlns=""http://purl.org/atom/ns#"">", "<feed>");

xmlDoc.LoadXml(response);
node = xmlDoc.SelectSingleNode("/feed/fullcount");
int mailCount = Convert.ToInt32(node.InnerText);
string[] emails = new string[0];
if (mailCount > 0)
{
emails = new string[mailCount];
nodelist = xmlDoc.SelectNodes("/feed/entry");
node = xmlDoc.SelectSingleNode("title");

int tempCounter = 0;
foreach (XmlNode n in nodelist)
{
emails[tempCounter] = "From: " + n.ChildNodes[6].InnerText + "\nSubject: "+ n.FirstChild.InnerText+"\nSummary: "+n.ChildNodes[1].InnerText;
tempCounter++;
}
}
return emails;
}
}
}
>>
>>56946029
Idgaf what he gave you. I just hope you're desperate enough to use that code I gave you and your school is smart enough to catch you.
>>
youre such a fucking faggot
>>
>>56946063
LOL
Thread posts: 40
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.