473,785 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SmtpMail.SmtpSe rver

1 New Member
I'm having issues with an aspx script. It is rejecting any submissions from people with gmail accounts.

Could this be because the smtp server it is trying to use doesn't exists or allow outgoing mail?

My smtp server (smtpout.secure server.net) requires authentication.

What can I do about this?

My script is below:
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="vb" AutoEventWireup="true" %>
  2. <%@ Import Namespace="System.Web.Mail" %>
  3. <script runat="server">
  4.     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
  5.  
  6.         ' Need an SMTP Mail object, which will send the actual mail.
  7.  
  8.         ' Use the local SMTP server.  If using a server other than the web server, that
  9.         ' name should be specified here instead of String.Empty
  10.         SmtpMail.SmtpServer = String.Empty
  11.  
  12.         ' Create a new mail message
  13.         Dim message As MailMessage = New MailMessage
  14.         ' Just a plain text message, use MailFormat.Html for an HTML message
  15.         message.BodyFormat = MailFormat.Html
  16.         ' You can use high priority, but you will most likely just leave it like this...
  17.         message.Priority = MailPriority.Normal
  18.         ' Probably replace the message.From line with this instead:
  19.         message.From = Request("email")
  20.         ' message.From = "sender@example.com"
  21.         ' The address goes here.  I put the forms one in to test, but it will
  22.         ' probably look like this:
  23.         message.To = "subscribe@theslangs.com"
  24.         ' A CC here.  If no CC, just leave the comment on the next line
  25.         message.Cc = ""
  26.         ' Subject
  27.         message.Subject = "The Slangs - Mailing List Signup"
  28.         ' Your body goes here.  You can build huge strings--this is just a simple 
  29.         ' example.
  30.         message.Body = String.Format("{0} would like to be added to The Slang's e-mailing list.", Request("email"))
  31.         ' This line is what actually sends the mail.
  32.         SmtpMail.Send(message)
  33.         ' Forward the person off to a thank-you page.
  34.         Response.Redirect("http://www.theslangs.com/thanks.asp")
  35.  
  36.     End Sub
  37. </script>
  38.  
Feb 16 '09 #1
2 4698
Plater
7,872 Recognized Expert Expert
This is an ASP.NET 1.1 project (as opposed to 2.0 or 3.x) then right, since you are using objects that were replaced in the later versions.

I believe you are going to need to upgrade or find a 3rd party smtp solution there.
Pretty sure I remember reading that 1.1's smtpserver didn't support authenticating.
Feb 17 '09 #2
shrimant
48 New Member
http://bytes.com/topic/visual-basic/...d-mail-thru-vb

May be this old article helps
Feb 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2455
by: Cameron Eckman | last post by:
I get various errors when I try to use email on the machine I have. XP professional. It works fine on another machine with NT 2000 server. Below is the code: 'BEGIN CODE Dim oMail As New MailMessage() With oMail .From = "mypc@baxglobal.com" .To = "ceckman@baxglobal.com"
3
2021
by: JJBW | last post by:
Hi I am having a bit of a problem with SmtpMail. I have a bit of code that should send an email but when it is executed no email turns up. MailMessage mmNotify = new MailMessage(); mmNotify.From = ; mmNotify.To = ; mmNotify.BodyFormat = MailFormat.Text;
5
2152
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. --------------------------------------------------------------------------------
2
1800
by: Edward | last post by:
Hello, everybody, I tried to send Email out using ASP.NET, but failed, here is the code of sending: -------------------------------------------------------------------------------- Try Try 'SmtpMail.SmtpServer = "smtp.citiz.net"
0
1624
by: EO | last post by:
Could someone help me understand why the following seems to be an effective band-aid for CDO object errors? smtpmail.smtpserver.insert(0,"localhost") Looking at the documentation on smtpmail.smtpserver at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasssmtpservertopic.asp there is nothing documented about an insert method. Is this some generic method that's always around? Is...
0
1831
by: Eric van Wijk | last post by:
Hi All, After installing SP1 for Windows 2003, I'm running into the 'Error loading type library/DLL' exception when using CDO through System.Web.Mail: ------------------------------------------- //try { // security assertion
2
1841
by: kmbarz | last post by:
I'm trying to expand my horizons here by working through an ASP.Net book. When I do the example that uses: Line 55: Mail.From = "feedback@graymad.com" Line 56: SmtpMail.SmtpServer = "localhost" Line 57: SmtpMail.Send(Mail) I get: myemail@comcast.net
3
1564
by: aslantifosi | last post by:
hi all, My question is about that i use a smpt server which is running on a different machine from my webserver machine. And i can authenticate with a user and password. I use SmtpMail class. i set the smtpserver property. but how can i authenticate with my user and pass? for ex: my user :xxxx@xxx.com pass :12345
19
3372
by: zdrakec | last post by:
Hello all: Using an "Imports System.Web.Mail" clause at the head of my module, and after executing the following code: Dim msg As New MailMessage msg.From = sender msg.To = recipient msg.Attachments.Add(New MailAttachment(attachFile)) msg.Subject = subjectString
3
1834
by: Nathan Sokalski | last post by:
I have an ASP.NET page that sends a Mail.MailMessage to several email addresses (all mine). However, one of the addresses, the one ending in @verizon.net, does not seem to be recieving the message even though the other addresses are. I know the spelling is correct because I have tried sending messages from my other accounts to this address and have recieved them successfully. I also do not know of any junkmail filter that would delete the...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
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
10356
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...
1
10100
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
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
8988
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 project—planning, coding, testing, and deployment—without 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
7509
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
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
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 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.