views:

39

answers:

1

I have a application I'm currently working on and it includes a form that allows the user to register it. I have the information stored in a string and I would like that information emailed to my gmail account. I searched online and I was able to send it using my gmail account but not everyone has gmail and the code requires a password from the sender.

is there a way to do this?

A: 

In your code you can provide credentials for your gmail account you can use to send emails to other accounts. Check System.Net.Mail namespace - you can start here:

http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx

Jakub Konecki
Of course, if he embeds **his** gmail credentials in his application, **anyone** who has a copy of his application can find them using reflector. (I assume you meant that using the bold above, but I thought I would make it absolutely clear.) :)
Zach Johnson
I'm aware I can put my credentials and it works, but like Zach says, I do not want to include my gmail info in this app, only my email of course
pablosal
@Zach Johnson - you are of course right, but it was nowhere stated what king of application it is and whether users have access to binaries. Providing own email details in web app for example is acceptable.
Jakub Konecki