473,513 Members | 2,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

local smtp quistion plz

18 New Member
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
Expand|Select|Wrap|Line Numbers
  1. System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();
  2.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "localhost";
  3.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = "25";
  4.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = "2";
  5.             //sendusing: cdoSendUsingPort, value 2, for sending the message using 
  6.             //the network.
  7.  
  8.             //smtpauthenticate: Specifies the mechanism used when authenticating 
  9.             //to an SMTP 
  10.             //service over the network. Possible values are:
  11.             //- cdoAnonymous, value 0. Do not authenticate.
  12.             //- cdoBasic, value 1. Use basic clear-text authentication. 
  13.             //When using this option you have to provide the user name and password 
  14.             //through the sendusername and sendpassword fields.
  15.             //- cdoNTLM, value 2. The current process security context is used to 
  16.             // authenticate with the service.
  17.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = "1";
  18.             //Use 0 for anonymous
  19.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "mail@yahoo.com";
  20.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "password";
  21.             msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"] = "true";
  22.  
  23.             msg.From = "mail@yahoo.com";
  24.             msg.BodyFormat = System.Web.Mail.MailFormat.Html;
  25.             msg.To = "mail@yahoo.com";
  26.             msg.Subject = "subject";
  27.             msg.Body = "message body";
  28.             System.Web.Mail.SmtpMail.SmtpServer = "localhost:25";
  29.             System.Web.Mail.SmtpMail.Send(msg);
  30.  
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??
Mar 15 '09 #1
20 2323
tlhintoq
3,525 Recognized Expert Specialist
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.
Mar 15 '09 #2
remohy1
18 New Member
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
Mar 19 '09 #3
tlhintoq
3,525 Recognized Expert Specialist
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.
Mar 19 '09 #4
remohy1
18 New Member
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
Mar 19 '09 #5
Plater
7,872 Recognized Expert Expert
@remohy1
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
Mar 19 '09 #6
remohy1
18 New Member
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
Mar 19 '09 #7
Plater
7,872 Recognized Expert Expert
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.
Mar 19 '09 #8
remohy1
18 New Member
its working in vs 2005 and vs 2008
Mar 19 '09 #9
Plater
7,872 Recognized Expert Expert
Well System.Web.Mail is depricted after .NET1.1, you should be using System.Net.Mail instead.
Mar 19 '09 #10
remohy1
18 New Member
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??
Mar 19 '09 #11
Plater
7,872 Recognized Expert Expert
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.
Mar 19 '09 #12
remohy1
18 New Member
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?
Mar 19 '09 #13
tlhintoq
3,525 Recognized Expert Specialist
@remohy1
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.
Mar 19 '09 #14
remohy1
18 New Member
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?
Mar 19 '09 #15
Plater
7,872 Recognized Expert Expert
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
Mar 19 '09 #16
remohy1
18 New Member
@Plater
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?
Mar 19 '09 #17
Plater
7,872 Recognized Expert Expert
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
Mar 19 '09 #18
remohy1
18 New Member
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
"
Mar 19 '09 #19
Plater
7,872 Recognized Expert Expert
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.
Mar 19 '09 #20
remohy1
18 New Member
thanks alot for helping
Mar 19 '09 #21

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2992
by: jason | last post by:
What are the technical challenges in getting a local SMTP email server set up on a win3k system or alternatively on a win2k pro local work statation. We are on the verge of acquiring a new win3k...
0
1385
by: Ashish Sharma | last post by:
HI All, I urgently require a work around to get local SMTP Server Settings in IIS or smart host value if specified. We r using a Thiry Party Component which basically sends Secure Mails. Unlike...
2
9914
by: Kikoz | last post by:
Hi all. I'm using one PC/XP Pro as my development environment. Its IIS has one default web site, of course, which is the site I'm working on. When some feature is finished I deploy it to my...
2
1035
by: zubair | last post by:
Hello All I have just comeacross a problem: I'm debugging a site on my local computer using Visual Studio.net. When I send mail it gives error "System.Runtime.InteropServices.COMException: The...
3
4009
by: Gancy | last post by:
Is there a way to programatically find a SMTP server available on the network? I am writing a C#.Net program, which should first find a SMTP server on LAN and use that SMTP server to send an...
2
5844
by: | last post by:
I want to send email without Smtp Server. We have a Imail Server installed on our web server which requires Smtp server is not working on it. When i disable Smtp Server on the local machine Cdo...
7
4038
by: huntedsnark | last post by:
I am working on a webpage that is on a different server than the email server that the company wants me to use to send emails. Is it possible to change the PHP.ini file to use this non-local SMTP...
4
4813
by: lage | last post by:
Hi, I am working with a web site that uses CDONTS from a function in a Com+ component to send mail to clients after sign up etc, as well as sending clients mail to support from a web form. A...
13
6642
by: btreddy | last post by:
Hii all, I've been searching in the internet just to know abt SMTP server. Can anybody tell me how to configure the SMTP server and how can i send the mails and how could i check whether...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.