Ok I think I've almost got my problem solved. I am using this code to send
mail.
I am simply pasting it into an .ASP page. Why doesn't this code work? I do
have
..NET 2.0 installed, but I haven't done any configuration to it. Am I
missing something?
'Create a new MailMessage object and specify the"From" and "To" addresses
Dim Email As New System.Net.Mail.MailMessage( _
"Br***********@orcsweb.com", "Br**@KingsleyTeam.com")
Email.Subject = "test subject"
Email.Body = "this is a test"
Dim mailClient As New System.Net.Mail.SmtpClient()
'This object stores the authentication values
Dim basicAuthenticationInfo As _
New System.Net.NetworkCredential("username", "password")
'Put your own, or your ISPs, mail server name onthis next line
mailClient.Host = "Mail.RemoteMailServer.com"
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo
mailClient.Send(Email)
<%'Create a new MailMessage object and specify the"From" and "To" addresses
Dim Email As New System.Net.Mail.MailMessage( _
"te***@domain.com", "te***@domain.com")
Email.Subject = "test subject"
Email.Body = "this is a test"
Dim mailClient As New System.Net.Mail.SmtpClient()
'This object stores the authentication values
Dim basicAuthenticationInfo As _
New System.Net.NetworkCredential("username", "password")
'Put your own, or your ISPs, mail server name onthis next line
mailClient.Host = "Mail.RemoteMailServer.com"
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo
mailClient.Send(Email)%> 6 1411
Any .ASP page will not run under asp.net, it will run under asp. You can't
have .NET code in an ASP page unless you configure IIS to handle all
requests to .asp pages.
So then what should I do? I am trying to use ASP to send
mail out to an SMTP server that requires authentication and
I was told to upgrade to .NET 2.0 and I would have additional
features. But apparently I they are not working for me.
Any ideas on what I should do next? I can re-configure
my IIS if I need to do that.
Paul
>
"AbraAbraCadabra" <nw*@gsw-inc.comwrote in message
news:Ob****************@TK2MSFTNGP06.phx.gbl...
>Ok I think I've almost got my problem solved. I am using this code to send mail. I am simply pasting it into an .ASP page. Why doesn't this code work? I do have .NET 2.0 installed, but I haven't done any configuration to it. Am I missing something?
'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage( _ "Br***********@orcsweb.com", "Br**@KingsleyTeam.com") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo mailClient.Send(Email) <%'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage( _ "te***@domain.com", "te***@domain.com") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo mailClient.Send(Email)%>
Well, you either decide you are using ASP or ASP.NET.
If you want to use ASP, then you can't use .NET code like that. If whatever
ASP supports doesn't support authentication, you need to find an email
component you can use from ASP.
Or, you can switch over to ASP.NET, and then use .NET code.
You can't mix the 2 technologies like you are trying to do.
If you reconfigure IIS to process ASP pages as ASP.NET pages, then why not
simply make the pages ASP.NET to begin with, since it will be the
equivalent?
"AbraAbraCadabra" <nw*@gsw-inc.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Any .ASP page will not run under asp.net, it will run under asp. You can't have .NET code in an ASP page unless you configure IIS to handle all requests to .asp pages.
So then what should I do? I am trying to use ASP to send
mail out to an SMTP server that requires authentication and
I was told to upgrade to .NET 2.0 and I would have additional
features. But apparently I they are not working for me.
Any ideas on what I should do next? I can re-configure
my IIS if I need to do that.
Paul
>> "AbraAbraCadabra" <nw*@gsw-inc.comwrote in message news:Ob****************@TK2MSFTNGP06.phx.gbl...
>>Ok I think I've almost got my problem solved. I am using this code to send mail. I am simply pasting it into an .ASP page. Why doesn't this code work? I do have .NET 2.0 installed, but I haven't done any configuration to it. Am I missing something?
'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage( _ "Br***********@orcsweb.com", "Br**@KingsleyTeam.com") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo mailClient.Send(Email) <%'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage( _ "te***@domain.com", "te***@domain.com") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo mailClient.Send(Email)%>
Any .ASP page will not run under asp.net, it will run under asp. You can't
have .NET code in an ASP page unless you configure IIS to handle all
requests to .asp pages.
"AbraAbraCadabra" <nw*@gsw-inc.comwrote in message
news:Ob****************@TK2MSFTNGP06.phx.gbl...
Ok I think I've almost got my problem solved. I am using this code to
send mail.
I am simply pasting it into an .ASP page. Why doesn't this code work? I
do have
.NET 2.0 installed, but I haven't done any configuration to it. Am I
missing something?
'Create a new MailMessage object and specify the"From" and "To" addresses
Dim Email As New System.Net.Mail.MailMessage( _
"Br***********@orcsweb.com", "Br**@KingsleyTeam.com")
Email.Subject = "test subject"
Email.Body = "this is a test"
Dim mailClient As New System.Net.Mail.SmtpClient()
'This object stores the authentication values
Dim basicAuthenticationInfo As _
New System.Net.NetworkCredential("username", "password")
'Put your own, or your ISPs, mail server name onthis next line
mailClient.Host = "Mail.RemoteMailServer.com"
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo
mailClient.Send(Email)
<%'Create a new MailMessage object and specify the"From" and "To"
addresses
Dim Email As New System.Net.Mail.MailMessage( _
"te***@domain.com", "te***@domain.com")
Email.Subject = "test subject"
Email.Body = "this is a test"
Dim mailClient As New System.Net.Mail.SmtpClient()
'This object stores the authentication values
Dim basicAuthenticationInfo As _
New System.Net.NetworkCredential("username", "password")
'Put your own, or your ISPs, mail server name onthis next line
mailClient.Host = "Mail.RemoteMailServer.com"
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo
mailClient.Send(Email)%>
Well, you either decide you are using ASP or ASP.NET.
>
If you want to use ASP, then you can't use .NET code like that. If
whatever ASP supports doesn't support authentication, you need to find an
email component you can use from ASP.
Or, you can switch over to ASP.NET, and then use .NET code.
You can't mix the 2 technologies like you are trying to do.
If you reconfigure IIS to process ASP pages as ASP.NET pages, then why not
simply make the pages ASP.NET to begin with, since it will be the
equivalent?
Oh I think I see now. I didn't realize the two technologies couldn't be
mixed. I have an entire website that is written in ASP and note ASP.NET.
If I configure my IIS to support ASP.NET will my website still run? Or do I
have to make a bunch of changes to it? And then how do I make sure my IIS
is configured for ASP.NET and not just ASP?
Once you install .NET, IIS should get configured to run .aspx files under
ASP.NET and so forth. So you can start creating asp.net applications, and
they should just run.
Oh ok. I have already done that. So then all I need to do is to start
using .aspx files instead of .asp files and that will allow me to run
ASP.NET?
Everything will still run, ASP will still run just fine.
Once you install .NET, IIS should get configured to run .aspx files under
ASP.NET and so forth. So you can start creating asp.net applications, and
they should just run.
"AbraAbraCadabra" <nw*@gsw-inc.comwrote in message
news:uk**************@TK2MSFTNGP02.phx.gbl...
>Well, you either decide you are using ASP or ASP.NET.
If you want to use ASP, then you can't use .NET code like that. If whatever ASP supports doesn't support authentication, you need to find an email component you can use from ASP.
Or, you can switch over to ASP.NET, and then use .NET code.
You can't mix the 2 technologies like you are trying to do.
If you reconfigure IIS to process ASP pages as ASP.NET pages, then why not simply make the pages ASP.NET to begin with, since it will be the equivalent?
Oh I think I see now. I didn't realize the two technologies couldn't be
mixed. I have an entire website that is written in ASP and note ASP.NET.
If I configure my IIS to support ASP.NET will my website still run? Or do
I have to make a bunch of changes to it? And then how do I make sure my
IIS is configured for ASP.NET and not just ASP? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mimi |
last post by:
Hello,
I am having trouble using the session vars in
PHP 4.3.9
OS: Win XP Prof
Web Server IIS (is local and there are no links to other servers from
the web pages I work on)
Browser: IE 6.0
...
|
by: Martin Meng |
last post by:
Set up SMTP / smtp_from variable, as suggested in manual. But the
mail() function always return fails. I was trying to use
smtp.mail.yahoo.com I wonder if yahoo is somehow blocking smtp...
|
by: Mike the Canadian |
last post by:
I am having a very strange problem sending email with php. I have two
domains. I can send an email to one domain using php but not the
other. If I put both email addresses in the mail command only...
|
by: Abhishek |
last post by:
I have a problem transfering files using sockets from pocket pc(.net compact
c#) to desktop(not using .net just mfc and sockets 2 API). The socket
communication is not a issue and I am able to...
|
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...
|
by: VB Programmer |
last post by:
I have an ASPX page where I send out emails through my mail server
mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends
PERFECTLY. When I try sending an email to any other address...
|
by: zaebos |
last post by:
hi, i have this code which is part of a main program, to email from
within the program a log file:
int MailIt (char *mailserver, char *emailto, char *emailfrom,
char *emailsubject, char...
|
by: Mark A. Sam |
last post by:
Hello,
I am sending two emails from the same procedure, one to myself (while testing) and another (a comfirmation) to the user on the website.
I was having difficulty finding a relay server to...
|
by: Dormilich |
last post by:
this is a follow-up thread to this one.
http://bytes.com/topic/html-css/answers/863662-form-not-submitted-sometimes
I figured out that the mail sending class triggers the described error....
|
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
|
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...
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |