Hi all
I try to send email by smtp server.
But, my smtp server need authentication !
How can I do it?
with thanks
Motis 4 8843
as far as I know the built in .net object does not support this, you
need a third party tool
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.c om";
string from = "be*@contoso.co m";
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(fro m, to, subject, body);
SmtpClient client = new SmtpClient(serv er, port);
// Credentials are necessary if the server requires the client
// to authenticate before it will send e-mail on the client's behalf.
client.Credenti als = CredentialCache .DefaultNetwork Credentials;
client.Send(mes sage);
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Hi Vadym
I need a user name and password...
like
client.Credenti als = XXXXX.user name
client.Credenti als = 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.c om"; string from = "be*@contoso.co m"; 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(fro m, to, subject, body); SmtpClient client = new SmtpClient(serv er, port); // Credentials are necessary if the server requires the client // to authenticate before it will send e-mail on the client's behalf. client.Credenti als = CredentialCache .DefaultNetwork Credentials;
client.Send(mes sage); -- Regards, Vadym Stetsyak www: http://vadmyst.blogspot
Hi all
I need to do:
client.Credenti als = new System.Net.Netw orkCredential(" user", "password") ;
with thanks to you all
Moti
"motis" wrote: Hi Vadym
I need a user name and password... like
client.Credenti als = XXXXX.user name client.Credenti als = 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.c om"; string from = "be*@contoso.co m"; 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(fro m, to, subject, body); SmtpClient client = new SmtpClient(serv er, port); // Credentials are necessary if the server requires the client // to authenticate before it will send e-mail on the client's behalf. client.Credenti als = CredentialCache .DefaultNetwork Credentials;
client.Send(mes sage); -- Regards, Vadym Stetsyak www: http://vadmyst.blogspot This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 account.
I was using optimum online service with smtp server as “mail.optonline.net”.
I can receive email correctly.
Now I switch to verizon DSL. I change my smtp server accordingly as
|
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 serve
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "your_username"); //set your username here for the smtp serve
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",...
|
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 be used in
an intranet environment:
MailMessage Message = new MailMessage();
Message.To = ...
....
SmtpMail.SmtpServer = ...
|
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 with this code:
MailMessage msgMail = new MailMessage();
msgMail.To = "test@address.com";
msgMail.From = "from@address.com";
msgMail.Subject = "Mail Example Subject";
|
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 must be a common thing to do. I have been utterly unable to
google an answer.
--Tony Archer
| |
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 authentication
(charter.net for instance) but will send the SMTP mail without providing
authentication
while others such as Comcast I cannot seem to accept anything.
|
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 "127.0.0.1".
4. Authentication: "Anonymous access" only.
5. Outbound connection listen to TCP 25.
Besides,
|
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 free edition for anti-virus.
I use an ISP provider from my country and according to them I do not
need to perform authentication while sending mails through their SMTP
address. Thus I am using external SMTP server. I don't have IIS
installed...
|
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 (currently about
1000 messages are sent daily) are sent by SMTP through postfix.
I'm contemplating moving this particular site's email to Gmail.
Is it possible to send mail through Gmail's servers with authentication
and everything?
|
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 response was: Server
policy dictates you must authenticate first "
So far as I can tell, my code is doing what it's meant to, but I'd
appreciate someone casting an eye over it to make sure. This is based
on a couple of examples found through...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |