473,625 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

authenticating to smtp server / cdo

Hi,

I'm trying to use system.web.mail to send an email, but the smtp server
requires authentication. I cam across some info about extra fields allowed
via the following:

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

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

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

mail.Fields.Add ("http://schemas.microso ft.com/cdo/configuration/sendpassword
", "password") 'set your password here
SmtpMail.SmtpSe rver = "smtp.domain.co m" 'your real server goes here
SmtpMail.Send(m ail)
Unfortunatley, I get a compilation error:

'Fields' is not a member of 'System.Web.Mai l.MailMessage'

Can anyone shed some light on how to send mail through an smtp server that
requires authentication?

Thanks much,
Brian



Nov 18 '05 #1
1 1176
Use .Net Framework 1.1 instead of 1.0 and you shouldn't receive this error anymore

Nov 18 '05 #2

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

Similar topics

6
2847
by: Smitro | last post by:
Hi, I'm looking for a Tutorial about Authenticating using PHP and Linux User Accounts. Can some one point me in the right direction? Smitro
2
7935
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
7
2330
by: Nancy | last post by:
Hi, Is there any one knows, if I want to use mod_python to handle my html form, I must have a SMTP server on my PC(winxp pro)? Where can I get a free SMTP server? I cann't follow mod_python's manual example (http://www.svencoop.com/manual/mod/mod_python/tut-pub.html), why ... Thanks a lot.
21
3364
by: Nancy | last post by:
Hi, Guys, Is there any other way to use python or mod_python writing a web page? I mean, not use "form.py/email", no SMTP server. <form action="form.py/email" method="POST"> ... Thanks a lot. Nancy W
3
5565
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
3
16432
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 But I am having a problem figuring out the LDAP:// The LDAP:// that I pass looks like this (i substitued generic the
1
8036
by: bivin | last post by:
hai i am requesting your technical support. please help me. i have been working with this for five days. the problem is relating with the smtp. i am trying to send an email from the asp.net page. earlier it was showing send using not find error.
34
18220
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,
1
1288
by: mirlisa | last post by:
We have an odd problem. Sometime this morning our classic asp web application stopped authenticating against active directory. This is our only "classic" asp app that authenticates against ad. Note that this app has been in production for three years with no problems. All .NET apps are authenticating fine from the same server. This same classic asp app authenticates fine from our development server. There have been no code changes to...
0
8182
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,...
0
8688
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, 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...
0
8494
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
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, 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...
1
6115
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
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...
1
2614
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
2
1496
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 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...

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.