C#, here? not here?

Posts 1–15 of 17 · Page 1 of 2
C#, here? not here?
well, the thing is...

I'm learing C#, and i really am intrested in it, but for example, here in the forum, i don't see a board for C#, just C/c++, Java, Etc... Is this even a good place to post about C#? or Java section? (C# and java looks like the same sometimes). Or probabily creating a board to it?

EDIT: Oh, also trying to get into XNA.. later later use..

Thanks in advance
Just post here, a few members know C# so they might be able to help. It doesn't make sense posting about something related to C#/++ in the Java section. >_>
Quote Originally Posted by crushed View Post
Just post here, a few members know C# so they might be able to help. It doesn't make sense posting about something related to C#/++ in the Java section. >_>
i talked about C# and java, because they look like the same. but Thanks both, i guess.
Ask away, or if you don't feel like posting it, you can always PM me with your C# questions
Posting C# in this section is fine, B1ackAnge1 is godlike, and im working on the basics at the moment And I'm pretty sure theres more people on here that use C#
I love the way anything BA says gets thanked by all Maybe the same would happen to me if I'd stop flaming everyone

Nah.. Not gonna happen
I thanked you because you made a post where you didn't flame anybody.
I thanked BA because he's an array of pure awesomeness inside of a structure of Kick Ass, part of the class Super_fucking_awesome. And I thanked HD, because well. He's pretty much awesome, and if you disagree with him, YOU GET FLAMED! =O He is to the C++ community what Hitler was to the Nazi's. HE SHALL LEAD US TO GLORY! And flame anyone who stands in his way. (Namely VBFags.)
Quote Originally Posted by ilovecookies View Post
I thanked BA because he's an array of pure awesomeness inside of a structure of Kick Ass, part of the class Super_fucking_awesome. And I thanked HD, because well. He's pretty much awesome, and if you disagree with him, YOU GET FLAMED! =O He is to the C++ community what Hitler was to the Nazi's. HE SHALL LEAD US TO GLORY! And flame anyone who stands in his way. (Namely VBFags.)
I lol'd hard xD Sort of true, except for the fact that I won't commit suicide when my naz.. err... fellow C++ section members get slaughtered by VBfags
Quote Originally Posted by ilovecookies View Post
I thanked BA because he's an array of pure awesomeness inside of a structure of Kick Ass, part of the class Super_fucking_awesome. And I thanked HD, because well. He's pretty much awesome, and if you disagree with him, YOU GET FLAMED! =O He is to the C++ community what Hitler was to the Nazi's. HE SHALL LEAD US TO GLORY! And flame anyone who stands in his way. (Namely VBFags.)
You guys crack me up..lol
They can't slaughter us with bad grammar
Guys back on topic, please:

Ok, here is the thing, im trying to send a mail through C#:

Code:
try
{
MailMessage newMail = new MailMessage(); SmtpClient cliente = new SmtpClient("smtp." + separado); //Separado is a string which contains something like "gmail.com". And this is making it like most of smtps by default: smtp.gmail.com newMail.To.Add(mailsCorrectos[i].ToString()); //mailsCorrectos[i] contais the mail of the person in that index ex: xpto.gmail.com (for the smtp used) //it is a List<string> newMail.Subject = txtAssunto.Text; newMail.Body = wbHtmlPrev.DocumentText; //body, newsletter newMail.From = new MailAddress("newsLetter@blabla.net"); cliente.Send(newMail);
} catch {
blablabla
}
well the problem is, is there ANY POSSIBLE way to send it like this to an email without needing credentials? (user & pass)... sending it just like a newsletters..

i know it works with credentials and tested it already... but im like going to send a newsletter to someone and ask his mail & password..? obviously not..

im actually using:

Code:
Using System.Net.Mail;
on catch actually i have it to open a new form asking to the correct credentials, and smtp in case the Try fails. (invalid smtp or error sending because of credentials)

Thanks in advance
Quote Originally Posted by 'Bruno View Post
Guys back on topic, please:

Ok, here is the thing, im trying to send a mail through C#:

Code:
try
{
MailMessage newMail = new MailMessage(); SmtpClient cliente = new SmtpClient("smtp." + separado); //Separado is a string which contains something like "gmail.com". And this is making it like most of smtps by default: smtp.gmail.com newMail.To.Add(mailsCorrectos[i].ToString()); //mailsCorrectos[i] contais the mail of the person in that index ex: xpto.gmail.com (for the smtp used) //it is a List<string> newMail.Subject = txtAssunto.Text; newMail.Body = wbHtmlPrev.DocumentText; //body, newsletter newMail.From = new MailAddress("newsLetter@blabla.net"); cliente.Send(newMail);
} catch {
blablabla
}
well the problem is, is there ANY POSSIBLE way to send it like this to an email without needing credentials? (user & pass)... sending it just like a newsletters..

i know it works with credentials and tested it already... but im like going to send a newsletter to someone and ask his mail & password..? obviously not..

im actually using:

Code:
Using System.Net.Mail;
on catch actually i have it to open a new form asking to the correct credentials, and smtp in case the Try fails. (invalid smtp or error sending because of credentials)

Thanks in advance

SMTP requires authentication if the server is setup that way (99.9999% nowadays are). there are some public ones floating around, but spammers knocked that amount down to next to nothing.

Now you say you want to SEND someone your newsletter email, but then ask about asking for their username/pw. If you send an email to someone you obvioulsy don't need their credentials.

So I'm not quite sure what you're REALLY trying to do

is it:
a) If you run an app on their computer for them to send a 'newsletter' they write to people they know (so you wrote a mailing app for them) it should be no problem to ask them for a SMTP server address & credentials. In fact that'd be the expected behavior since you don't know who/what they use for their email. Also you'd want the option to save those somewhere (config files, registry etc) so that they won't have to enter them every time if they so choose.

b) If you want to send other people a 'newsletter' you write then just run it on your computer, use your own credentials and call it good..

c) of course if you want to use their computer and email something without them knowing - basically trojan/spam (which really sounds more like it ) you'll have to use a server with a username/pw you provide in code or find a SMTP server that's public. You could always create a dummy gmail account or whatever, but then you have to remember they may have flood control enabled etc preventing the sending of too many emails at once and if the account gets blocked your program is dead in the water. (that's when getting updated credentials from online somewhere or a list of alternating logins come into play)

d) Spam SUCKS so if it's C don't do it man
Quote Originally Posted by B1ackAnge1 View Post
SMTP requires authentication if the server is setup that way (99.9999% nowadays are). there are some public ones floating around, but spammers knocked that amount down to next to nothing.

It all depends on what you're really trying to do:
a) If you run an app on their computer for them to send a 'newsletter' they write to people they know (so you wrote a mailing app for them) it should be no problem to ask them for a SMTP server address & credentials. In fact that'd be the expected behavior since you don't know who/what they use for their email. Also you'd want the option to save those somewhere (config files, registry etc) so that they won't have to enter them every time if they so choose.

b) If you want to send other people a 'newsletter' you write then just run it on your computer, use your own credentials and call it good..

c) of course if you want to use their computer and email something without them knowing - basically trojan/spam (which really sounds more like it ) you'll have to use a server with a username/pw you provide in code or find a SMTP server that's public. You could always create a dummy gmail account or whatever, but then you have to remember they may have flood control enabled etc preventing the sending of too many emails at once and if the account gets blocked your program is dead in the water. (that's when getting updated credentials from online somewhere or a list of alternating logins come into play)

d) Spam SUCKS so if it's C don't do it man
this was part of a exercise i got, the objective was to create 2 app's:

1 one)
A thing for people to register saying that they want to receive a newsletter.. bla bla bla, registering for something (not defined, just had to register).
Then it would save those e-mail's and things on a .txt file (or w/e).

2 one)
this one should get that .txt file created before, see the people that wanted the newsletter, and then send the email to them.

The program should be running on a "Company".
One person from it should like run the program every time a newsletter was needed to be send, see from the registered people who had newsletter active, and send it.

edit:
im not quite sure what you mean with option B, because it would ask for the credentials of the guy that is going to receive the mail right? or am i wrong?
If right, probably i have no access to those credentials.
edit2: oh and im not into those things on hacking , send trojans, spams, etc.. im just trying to expand my knowledge (just learn.. at least for now).
You dont need the credentials of who you're sending it to, just their email lol.
You need your own credentials to login on the smtp server and then you're able to send emails
Posts 1–15 of 17 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us