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;
}
}
}
/thread
you must be 18 to post here
boomp
bumpin some more
What language?
What is going on
Some fag is spamming thread I guess
Absolutely garbage code
bump for fags
plz someone.
please someone help me i'm a little bitch that can't code for myself
>>56942808
LOL
another bump
>>56942887
I dont c
>>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.
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