473,800 Members | 2,614 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code equivalent for this.......Help

HI,

Below is the code in vb to send mail using CDO object. I
want to do the same in VB.Net , i need to know how to sent
the authentication in vb.net "
..Item(cdoSMTPA uthenticate) = cdoBasic"


VB
-------------------------------------------------------

Dim iMsg as New CDO.Message
Dim iConf as New CDO.Configurati on

Dim Flds as ADODB.Fields
Set Flds = iConf.Fields

With Flds
.Item(cdoSendUs ingMethod) = cdoSendUsingPor t
.Item(cdoSMTPSe rverName)
= "so******@micro soft.com"
.Item(cdoSMTPCo nnectionTimeout ) = 10 ' quick timeout
.Item(cdoSMTPAu thenticate) = cdoBasic
.Item(cdoSendUs erName) = "username"
.Item(cdoSendPa ssword) = "password"
.Item(cdoURLPro xyServer) = "server:80"
.Item(cdoURLPro xyBypass) = "<local>"
.Item(cdoURLGet LatestVersion) = True
.Update
End With

With iMsg
Set .Configuration = iConf
.To = """User A"" <us***@microsof t.com>"
.From = """User B"" <us***@microsof t.com>"
.Subject = "Hows it going? I've attached my web
page"
.CreateMHTMLBod y "http://mypage"
.AddAttachment "C:\files\myboo k.doc"
.Send
End With
-------------------------------------------------------

thanks
Nov 17 '05 #1
2 1698
Hi Jyakumar,

Please refer the System.Web.Mail namespace. This is the CDO implementation
in .net world. Please refer the following link.
http://www.codeproject.com/useritems/epsendmail.asp

--
Let me know if you need further help

Regards
Sreejumon[MVP]
www.mstechzone.com

"jayakumar" <ja********@hot mail.com> wrote in message
news:08******** *************** *****@phx.gbl.. .
HI,

Below is the code in vb to send mail using CDO object. I
want to do the same in VB.Net , i need to know how to sent
the authentication in vb.net "
.Item(cdoSMTPAu thenticate) = cdoBasic"


VB
-------------------------------------------------------

Dim iMsg as New CDO.Message
Dim iConf as New CDO.Configurati on

Dim Flds as ADODB.Fields
Set Flds = iConf.Fields

With Flds
.Item(cdoSendUs ingMethod) = cdoSendUsingPor t
.Item(cdoSMTPSe rverName)
= "so******@micro soft.com"
.Item(cdoSMTPCo nnectionTimeout ) = 10 ' quick timeout
.Item(cdoSMTPAu thenticate) = cdoBasic
.Item(cdoSendUs erName) = "username"
.Item(cdoSendPa ssword) = "password"
.Item(cdoURLPro xyServer) = "server:80"
.Item(cdoURLPro xyBypass) = "<local>"
.Item(cdoURLGet LatestVersion) = True
.Update
End With

With iMsg
Set .Configuration = iConf
.To = """User A"" <us***@microsof t.com>"
.From = """User B"" <us***@microsof t.com>"
.Subject = "Hows it going? I've attached my web
page"
.CreateMHTMLBod y "http://mypage"
.AddAttachment "C:\files\myboo k.doc"
.Send
End With
-------------------------------------------------------

thanks

Nov 17 '05 #2
Whatever account ASP.Net is running under, that is the account that is
sending the mail. Just add that account to the SMTP Server's authenticated
operators.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.

"jayakumar" <ja********@hot mail.com> wrote in message
news:08******** *************** *****@phx.gbl.. .
HI,

Thanks, but my smtp server is authenticated. How do u
specify the Username and password for the server.

-----Original Message-----
Hi Jyakumar,

Please refer the System.Web.Mail namespace. This is the

CDO implementation
in .net world. Please refer the following link.
http://www.codeproject.com/useritems/epsendmail.asp

--
Let me know if you need further help

Regards
Sreejumon[MVP]
www.mstechzone.com

"jayakumar" <ja********@hot mail.com> wrote in message
news:08******* *************** ******@phx.gbl. ..
HI,

Below is the code in vb to send mail using CDO object. I want to do the same in VB.Net , i need to know how to sent the authentication in vb.net "
.Item(cdoSMTPAu thenticate) = cdoBasic"


VB
-------------------------------------------------------

Dim iMsg as New CDO.Message
Dim iConf as New CDO.Configurati on

Dim Flds as ADODB.Fields
Set Flds = iConf.Fields

With Flds
.Item(cdoSendUs ingMethod) = cdoSendUsingPor t
.Item(cdoSMTPSe rverName)
= "so******@micro soft.com"
.Item(cdoSMTPCo nnectionTimeout ) = 10 ' quick timeout
.Item(cdoSMTPAu thenticate) = cdoBasic
.Item(cdoSendUs erName) = "username"
.Item(cdoSendPa ssword) = "password"
.Item(cdoURLPro xyServer) = "server:80"
.Item(cdoURLPro xyBypass) = "<local>"
.Item(cdoURLGet LatestVersion) = True
.Update
End With

With iMsg
Set .Configuration = iConf
.To = """User A"" <us***@microsof t.com>"
.From = """User B"" <us***@microsof t.com>"
.Subject = "Hows it going? I've attached my web
page"
.CreateMHTMLBod y "http://mypage"
.AddAttachment "C:\files\myboo k.doc"
.Send
End With
-------------------------------------------------------

thanks

.

Nov 17 '05 #3

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

Similar topics

699
34271
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
0
2304
by: Josiah Carlson | last post by:
Good day everyone, I have produced a patch against the latest CVS to add support for two new formatting characters in the struct module. It is currently an RFE, which I include a link to at the end of this post. Please read the email before you respond to it. Generally, the struct module is for packing and unpacking of binary data. It includes support to pack and unpack the c types: byte, char, short, long, long long, char, *, and...
5
1519
by: Ahmad | last post by:
Hi all, I have written a simple c++ app, as I'm still learning c++. The thing works flawlessly on VC++6, but just doesn't work on g++. The transliterate function which causes the problem is supposed to search for some characters (2 or 1) and replace them with their equivalent Arabic characters from an array vector<string>. I have been debugging it on Linux for like 6 hours, and it's really boring that it works on vc++.
12
3305
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not complaining about it being broken, It's a CVS images. Such things happen. The whole subsystem is going through radical changes. I don't really want to say what I think of the code just yet. That would influence the opinions of others, and I really want to know how other people view these things,...
8
3042
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to what I really should do. I've had a look through Programming Python and the Python Cookbook, which have given me ideas, but nothing has gelled yet, so I thought I'd put the question to the community. But first, let me be a little more detailed...
6
1277
by: arnold | last post by:
HI I 've been trying to find the equivalent code in C# but I did not succeed. What is the equivalent of Collection in C#? Dim c_colNewCustomerDataRows As New Collection() If c_colNewCustomerDataRows.Count > 0 Then Dim drCustomers As DataSet1.CustomersRow For Each drCustomers In c_colNewCustomerDataRows DataSet11.Customers.Rows.Add(drCustomers)
8
8123
by: Nikkita | last post by:
Software such as Excel or Word exposes a COM object model which allows them to be automated by any language that can call COM objects. As I understand it, I can do the same in VB6 by writing an Activex EXE. Such a program can have a GUI which will be accessed by users in the normal way as well as exposing a COM object model. How can I do the .Net equivalent in VB.Net? According to VB.Net help, the VB.Net equivalent of an Activex EXE is...
1
1757
by: jeeji | last post by:
HI I am experiencing something funny here where I have two equivalent queries: If I run them through query analyzer, the first runs slower than the second, but if run through C# application, the first runs faster than the second. I have the following two equivalent versions of a query which I will present in psuedo code:
29
2584
by: Ancient_Hacker | last post by:
A while back I had to recompile some old code, originally written by a really good programmer, but one prone to use every trick in the book, and then some. There was a statement, something like this: Result = ( Mode == 2 ? TwoWayFunc : FourWayFunc ) ( Param1, Param2, Param3 );
7
3771
by: tararreb | last post by:
#include<stdio.h> /*This line is standard input output, # is directive, include is keyword, and stdio.h is header file*/ #include<stdlib.h> /*This line is standard input output, # is directive, include is keyword, and stdlib.h is standard library defininition*/ #include<math.h> /*This line is standard input output, # is directive, include is keyword, and math.h is mathematical declarations*/ main (void)
0
9551
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
10507
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
10279
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 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...
0
10036
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...
1
7582
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
5473
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...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2948
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.