local smtp quistion plz | Newbie | | Join Date: Mar 2009
Posts: 18
| |
how could i configure my local smtp to be able to send eamails via it??
and can i send emails from my yahoo mail or gmail via my local smtp?? that yahoo and gmail have a limitation per day sending via smtp so i want to use my local smtp to break thi limitation
the code i use for this is -
System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "localhost";
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = "25";
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "2";
-
//sendusing: cdoSendUsingPort, value 2, for sending the message using
-
//the network.
-
-
//smtpauthenticate: Specifies the mechanism used when authenticating
-
//to an SMTP
-
//service over the network. Possible values are:
-
//- cdoAnonymous, value 0. Do not authenticate.
-
//- cdoBasic, value 1. Use basic clear-text authentication.
-
//When using this option you have to provide the user name and password
-
//through the sendusername and sendpassword fields.
-
//- cdoNTLM, value 2. The current process security context is used to
-
// authenticate with the service.
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = "1";
-
//Use 0 for anonymous
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "mail@yahoo.com";
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "password";
-
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"] = "true";
-
-
msg.From = "mail@yahoo.com";
-
msg.BodyFormat = System.Web.Mail.MailFormat.Html;
-
msg.To = "mail@yahoo.com";
-
msg.Subject = "subject";
-
msg.Body = "message body";
-
System.Web.Mail.SmtpMail.SmtpServer = "localhost:25";
-
System.Web.Mail.SmtpMail.Send(msg);
-
note that this code succeeded when using yahoo smtp but when using localhost it throw an exception
The transport failed to connect to the server.
could u help??
|  | Moderator | | Join Date: Mar 2008 Location: Arizona, USA
Posts: 1,783
| | | re: local smtp quistion plz Quote:
Originally Posted by Yahoo Help Q: How many emails can I send via SMTP? Is there a limit?
A: Yes, your outbound email messages are limited to 500 per day, and each message can be sent to no more than 100 contacts at once.
In an effort to help protect all of our customers from spam, Yahoo! has become more aggressive in its requirements around SMTP limits. In addition to placing limits around the number of emails you can send from your desktop email software each day, we reject connections that don't conform to Internet best practices. http://help.yahoo.com/l/us/yahoo/sma...op/pop-36.html
If you are hitting up against these limits, then I suspect you are trying to build a SPAM system and I doubt anyone here is going to help with that.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
i am not going to build a spam but i am responsible for advertising in a company and i send messages to thier customers a bout thier products so i need to send the add to all the customers in one day not to send 500 add per day
i hope i can find help
|  | Moderator | | Join Date: Mar 2008 Location: Arizona, USA
Posts: 1,783
| | | re: local smtp quistion plz Quote:
yahoo mail or gmail via my local smtp
This doesn't sound like a corporate job sending mail to their customers. Maybe I'm wrong, but any company with a mailing list of 500 customers a day can just set up their own mail server and would not be going through Yahoo mail or G-mail.
So, if this is a legitimate work need that would be my recommended solution: To use the company's own mail server.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
dear sir its not a great corporate but at all i think u are going to understand my question "local smtp" this is what i am asking for
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz Quote:
Originally Posted by remohy1 dear sir its not a great corporate but at all i think u are going to understand my question "local smtp" this is what i am asking for Did you turn on the local SMTP server?
It's a service called "Simple Mail Transfer Protocol (SMTP)" and is part of the iis suite I believe
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
i have configuered it but i dont know how to use it
what is the smtp address that i can use as i used "localhost" but it dont succeded
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz
You would connect to it through localhost, but there will be no "myname@localhost" emails
This is a .NET1.1 project is it (visualstudio2003)? I've never seen the Fields[] property used like that, so I cannot speak to how that works. I was not aware you could get the old version of the smtp to authenticate either.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
its working in vs 2005 and vs 2008
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz
Well System.Web.Mail is depricted after .NET1.1, you should be using System.Net.Mail instead.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
this is not the problem
my question is that i am responsible for sending adds and that i succesfully send it via yahoo or gmail smtp but i asked can i use my local smtp to avoid limitation of 500 mail per day??
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz
Well if you are using depricated classes, that are not working, because they were not designed to do what you want....What do you expect a magic solution?
If your local SMTP server is on, I am pretty sure you specify no host or port number and uses them by default. At least thats the way the correct versions of smtp classes are suppossed to work.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
if i searched the web or someone here helped me to configure local smtp on the right way does it will work on gmail or yahoo mail?
|  | Moderator | | Join Date: Mar 2008 Location: Arizona, USA
Posts: 1,783
| | | re: local smtp quistion plz Quote:
Originally Posted by remohy1 this is not the problem
my question is that i am responsible for sending adds and that i succesfully send it via yahoo or gmail smtp but i asked can i use my local smtp to avoid limitation of 500 mail per day?? You have to pick one or the other... You either send through Yahoo as your SMTP host, or your own PC as the SMTP host, or Gmail as the SMTP host, or NetIdenty, or NetFirms...
Wanting to send through Yahoo yet send through your own SMTP doesn't make sense. Its like saying I have to drive my Dodge Ram Pickup, but I still want to do it through my VW bug.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
so you mean that i cant send from yahoo mail via my local smtp
this makes a problem for me that i wanna recieve the orders on my yahoo mail so i think the result that i have to send 500 mail every day
am i right?
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz
If you want the reply emails to go to a yahoo account, you either have to rely on some trickery (setting the reply-to address to your yahoo account, which some email programs detect as a spam warning) and using the local smtp server
OR
You have to use the yahoo smtp server, which requires authentication, which means you have to switch to using system.net.mail, and I am not sure yahoo even allows smtp access. Gmail WILL, but you have to "opt in" through the settings section of the webpage
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz Quote:
Originally Posted by Plater You have to use the yahoo smtp server, with requires authentication, which means you have to switch to using system.net.mail, and I am not sure yahoo even allows smtp access. Gmail WILL, but you have to "opt in" through the settings section of the webpage i can use gmail mail but what do you mean with
"with requires authentication" at all this is the only way i found on the internet wich allow sending mails via vs005 do you have any other succesful ways that achieve the goal you ment "Gmail allows smtp access" and what does it means?
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz
It should have said "which requires authentication", meaning you have to "log in" to the smtp server with valid credentials.
GMAIL allows you to use their smtp server if you enable it in the settings page, but they use a special type of smtp server and it also requires encryption
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
do you have a link that explain what you said :
"GMAIL allows you to use their smtp server if you enable it in the settings page, but they use a special type of smtp server and it also requires encryption
"
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 7,161
| | | re: local smtp quistion plz
Log into your gmail account, and go to settings. Flip through there until you find the section for allowing SMTP access.
You could also just google it, they have plenty of directions about it.
And plenty of people on here have asked questions about using gmail through .NET.
| | Newbie | | Join Date: Mar 2009
Posts: 18
| | | re: local smtp quistion plz
thanks alot for helping
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,501 network members.
|