473,397 Members | 1,969 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,397 software developers and data experts.

Authentication for SMTP Server using system.web.mail

I'm trying to use system.web.mail to send an email, but the smtp
server
requires authentication. I came across some info about fields
property

Dim mail As New MailMessage()
mail.To = "to@address.com
mail.From = "fr**@address.com"
mail.Subject = "this is a test email."
mail.Body = "Some text goes here"

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate", "1") 'basic authentication

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername
", "username") 'set your username here

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword
", "password") 'set your password here
SmtpMail.SmtpServer = "smtp.domain.com" 'your real server goes here
SmtpMail.Send(mail)
I get a compilation error:

'Fields' is not a member of 'System.Web.Mail.MailMessage'

Even though I have installed .Net Framework 1.1, i am not able to
compile the code. Can anybody help me on this.
Thanks in advance.
Ash
Nov 18 '05 #1
0 1438

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

Similar topics

5
by: Phil | last post by:
I've set up a form which sends info to my email address usind CDO 2000 w/ authentication which takes about 10 seconds for the message to get sent. Any suggestions? I can't afford the commercial...
1
by: Rodrigo | last post by:
I'm trying to send an email message using my SMTP server that requires authentication. How can I do that? My code is: Dim email As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage...
2
by: Radi Ivanov | last post by:
Hello, I am trying to send an e-mail message via code using the following two lines: ************************************************************************ SmtpMail.SmtpServer =...
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...
0
by: hyper | last post by:
The MailMessage class in System.Web.Mail in asp.net 1.1 doesn't contain any API that perform authentication. I found an article about this subject: How to enable SMTP Authentication using...
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...
1
by: Jeff | last post by:
I am receiving the following error: // error: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 No...
0
by: aravindansubramaniyam | last post by:
Hi, I'm using the following code in vb.Net for sending a mail. Its sending the mail from my system. but not sending in the server machine. In the server machine, "Server responses 5.7.3...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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
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
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.