• Coding
  • [ASP.NET] Configuring SMTP To Send Emails

Hey everyone,

Right from the start, one of the things I loved about PHP was the mail() function which made it so damn easy to send emails from my web application. Now, this is the first time I work on an ASP.NET website that will eventually go online and it should be able to send emails.

So, what do I need to know in order achieve that? Can I use Gmail as my SMTP server (is it smtp.gmail.com?)?

P.S: I did my homework and tried to find the answers online, but what really pisses me off is that they all end up saying "you need to find your own SMTP server"!! So how do I find the damn thing?! :)
You shouldn't use Gmail,well maybe only as last resort until you have fixed something up, i can help you with it then
But first, the obvious question, where are you going to host your site?
Shared Hosting: They will probably provide you with an SMTP service and you can manage email accounts through the control panel
VPS/Dedicated Hosting: A bit trickier because you will have to install your SMTP server and configure it and secure it which is not an easy task. Some hosts requires your to route your mail to their SMTP server.
So first, you need to identify the environment of your website
proners wroteBut first, the obvious question, where are you going to host your site?
The site is hosted on a shared hosting (for now). I have just asked my partner how the emails were created and he said "using Google Apps". He also said that he's not good with email stuff either but theoretically we should be able to use whatever SMTP server that is available for us which includes the one provided by the hosting company. But, he also mentioned that the emails might end up being sent to spam if we do but he's not sure... Any thoughts?
Mail function... easy? You haven't tried the mail object in ezcomponents.
Well Google Apps is a viable solution too. It requires you to verify ownership of the domain and to point your MX record to a Google IP.
But IMO it is much simpler to use the service provided by your hosting.
It may be best to explore both options.