473,796 Members | 2,740 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 4699
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
2460
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
2155
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
1625
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
1834
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
9685
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...
1
10201
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
10021
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
9061
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
7558
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
6802
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
5454
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.