Web application, which is hosted on a shared server owned by another
company.
Do you simply specify the SMTP host of your own email account, or do shared
servers typically have services available that can be used for this?
I'm creating an application for a client and am not sure if I should ask
them for their email account information, which I assume includes their
password, etc.
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com"Jonathan Wood" <jwood@.softcircuits.comwrote in message
news:u5PjN7fQIHA.4684@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
>I was curious what most people do when they want to send an email from
>their Web application, which is hosted on a shared server owned by another
>company.
Quote:
Originally Posted by
Do you simply specify the SMTP host of your own email account, or do
shared servers typically have services available that can be used for
this?
the ones I've used have all had SMTP service available; I wouldn't use them
if they didn't
Quote:
Originally Posted by
I'm creating an application for a client and am not sure if I should ask
them for their email account information, which I assume includes their
password, etc.
I usually request their admin to set up an application email account with
its own uid/pwd; I really don't ever want to know any user passwords if I
don't have to; some organizations have **extremely** strict prohibitions on
"lending" passwords or using them if it's not yours
"Jonathan Wood" <jwood@.softcircuits.comwrote in message
news:u5PjN7fQIHA.4684@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
>I was curious what most people do when they want to send an email from
>their Web application, which is hosted on a shared server owned by another
>company.
>
Do you simply specify the SMTP host of your own email account, or do
shared servers typically have services available that can be used for
this?
Your ISP should provide an STMP queue which you can relay through - if they
don't, then find a decent ISP...
E.g. www.hostinguk.net provide a mail server with an SMTP queue at
relay.hostinguk.net which can be used for this purpose:
http://www.support.hostinguk.net/mail/default.htm, but only from within
their internal network, which means no username and password are required...
Quote:
Originally Posted by
I'm creating an application for a client and am not sure if I should ask
them for their email account information, which I assume includes their
password, etc.
Shouldn't be necessary...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Jonathan,
For what it's worth, this is the code that I use to send emails from my code
whilst it's hosted on a server in the US (I'm a UK developer):
string fromMailAddress = [This is passed into to my method];
string emailServer = "smptp.hostingname_goes_here.com";
string hostName = "relay.hostingname_goes_here.com";
string duplicateConfirmationEmail = [From_my_web.config_file]
int portNumber = [Email_port_from_hosting_company_goes_here];
// This can be zero, but sometimes 25
System.Net.Mail.MailAddress fromMail = new
System.Net.Mail.MailAddress(fromMailAddress);
System.Net.Mail.MailAddress toMail = new
System.Net.Mail.MailAddress(custEmailAddress);
System.Net.Mail.MailAddress bccMail = new
System.Net.Mail.MailAddress(duplicateConfirmationE mail);
System.Net.Mail.MailMessage msgDetails = new
System.Net.Mail.MailMessage(fromMail, toMail);
msgDetails.Subject = "Subject goes here;
msgDetails.Body = "Body text here";
msgDetails.IsBodyHtml = true; // With this set you can put
<br/in the body text to get carriage returns etc.
System.Net.Mail.SmtpClient client = new
System.Net.Mail.SmtpClient(emailServer);
if (hostName != "")
{
// I can't send BCC emails whilst the code runs locally or on our internal
servers.
// So I check that the hostname and if set, I'll send the BCC.
msgDetails.Bcc.Add(bccMail);
client.Host = hostName;
}
if (portNumber != 0)
client.Port = portNumber;
client.Send(msgDetails);
Hope it helps.
Robert Silver
"Jonathan Wood" wrote:
Quote:
Originally Posted by
I was curious what most people do when they want to send an email from their
Web application, which is hosted on a shared server owned by another
company.
>
Do you simply specify the SMTP host of your own email account, or do shared
servers typically have services available that can be used for this?
>
I'm creating an application for a client and am not sure if I should ask
them for their email account information, which I assume includes their
password, etc.
>
Thanks.
>
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
>
>
In some cases you will find that you can just send e-mails from the web
server, no need for authentication (the server it sleft it's autohorized to
rely on a given smtp server).
More often you have to use user and password, I would ask the client what's
the case. To check if server and user and password are valid without having
to code .net try:
http://msexchangeteam.com/archive/2.../14/428324.aspx
For testing purposes you can rely on GMail to do some simple development
tests:
http://www.codeproject.com/KB/cs/Se...ailAccount.aspx
More info about SMTP and .net
http://www.tipsdotnet.com/ArticleBl...MTP&PageIndex=0
Good luck
Braulio
/// ----------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ----------
"Jonathan Wood" wrote:
Quote:
Originally Posted by
I was curious what most people do when they want to send an email from their
Web application, which is hosted on a shared server owned by another
company.
>
Do you simply specify the SMTP host of your own email account, or do shared
servers typically have services available that can be used for this?
>
I'm creating an application for a client and am not sure if I should ask
them for their email account information, which I assume includes their
password, etc.
>
Thanks.
>
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
>
>
They (the isp) should provide you with some smtp server and perhaps
credentials.
...
In my "introduction letter" I got from my hosting service, they provided me
the smtp server name.
If you want a quick and easy configuration answer to different smtp
servers...then go there:
http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!138.entry
The code is downloadable. And if you setup a free gmail account, you can
even experiment with that.
"Jonathan Wood" <jwood@.softcircuits.comwrote in message
news:u5PjN7fQIHA.4684@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
>I was curious what most people do when they want to send an email from
>their Web application, which is hosted on a shared server owned by another
>company.
>
Do you simply specify the SMTP host of your own email account, or do
shared servers typically have services available that can be used for
this?
>
I'm creating an application for a client and am not sure if I should ask
them for their email account information, which I assume includes their
password, etc.
>
Thanks.
>
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
>
"Scott Roberts" <sroberts@.no.spam.here-webworks-software.comwrote in
message news:%23NhhkIlQIHA.4128@.TK2MSFTNGP06.phx.gbl...
Quote:
Originally Posted by
Using an unprotected "relay" server for sending mail is a great way to
have all of your emails deposited directly into the recipient's Junk Mail
folder.
people should also keep in mind that if you run your own mail server
operating on a dynamic IP some hosts will reject mail from it, even if it
doesn't relay promiscuously ... your address block is effectively
black-listed ...
0 comments:
Post a Comment