473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

smtp server need authentication

Hi all

I try to send email by smtp server.
But, my smtp server need authentication !
How can I do it?
with thanks

Motis

Feb 13 '06 #1
4 8829
as far as I know the built in .net object does not support this, you
need a third party tool

Feb 13 '06 #2
Hello, motis!

how do you send your email? using networking or SmtpClient?
If you use SmtpClient look at Credentials property.

here is sample code

string to = "ja**@contoso.com";
string from = "be*@contoso.com";
string subject = "Using the new SMTP client.";
string body = @"Using this new feature, you can send an e-mail message from an application very easily.";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient(server, port);
// Credentials are necessary if the server requires the client
// to authenticate before it will send e-mail on the client's behalf.
client.Credentials = CredentialCache.DefaultNetworkCredentials;

client.Send(message);
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 13 '06 #3
Hi Vadym

I need a user name and password...
like

client.Credentials = XXXXX.user name
client.Credentials = XXXXX.password

Can you help...?

Moti

"Vadym Stetsyak" wrote:
Hello, motis!

how do you send your email? using networking or SmtpClient?
If you use SmtpClient look at Credentials property.

here is sample code

string to = "ja**@contoso.com";
string from = "be*@contoso.com";
string subject = "Using the new SMTP client.";
string body = @"Using this new feature, you can send an e-mail message from an application very easily.";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient(server, port);
// Credentials are necessary if the server requires the client
// to authenticate before it will send e-mail on the client's behalf.
client.Credentials = CredentialCache.DefaultNetworkCredentials;

client.Send(message);
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot

Feb 13 '06 #4
Hi all

I need to do:

client.Credentials = new System.Net.NetworkCredential("user", "password");

with thanks to you all

Moti

"motis" wrote:
Hi Vadym

I need a user name and password...
like

client.Credentials = XXXXX.user name
client.Credentials = XXXXX.password

Can you help...?

Moti

"Vadym Stetsyak" wrote:
Hello, motis!

how do you send your email? using networking or SmtpClient?
If you use SmtpClient look at Credentials property.

here is sample code

string to = "ja**@contoso.com";
string from = "be*@contoso.com";
string subject = "Using the new SMTP client.";
string body = @"Using this new feature, you can send an e-mail message from an application very easily.";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient(server, port);
// Credentials are necessary if the server requires the client
// to authenticate before it will send e-mail on the client's behalf.
client.Credentials = CredentialCache.DefaultNetworkCredentials;

client.Send(message);
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot

Feb 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
0
by: amallik | last post by:
//The following 3 lines of codes necessary if smtp server needs authenticatio mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication for smtp...
4
by: Tushar | last post by:
Please help: I found some of the following information in messeges in this group but I would like someone to confirm them please. I would like to use the following web-services / ASP.Net code to...
5
by: Andreas | last post by:
I am working with three computers, my developing computer, a Web Server and a Mail Server (Exchange). I am trying to send a email from the Web Server via the Mail Server to a valid email address...
2
by: T.Archer | last post by:
The host a client wants to use requires authentication to relay messages. How do I set the authentication (username/password) before using the smtpmail.send(mailmessage) method? Surely this...
2
by: scorpion53061 | last post by:
I would like to know how you guys are handling this issue...... Some ISP's are now requiring authentication when using SMTP (such as orcsweb) while others are refusing to accept plain text...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
7
by: John Drako | last post by:
Currently, I run postfix on my own server to send message from my site (password requests, account activation notices and other messages). I have phpMailer on the server and all the messages...
4
by: eruth | last post by:
Hi all, I'm trying to send an e-mail from a vb.net web form. I can create the message, but when it comes to actually sending it I get the following error. "Mailbox name not allowed. The server...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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
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 projectplanning, coding, testing,...
0
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...

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.