473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SmtpMail.SmtpServer

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.secureserver.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 4672
Plater
7,872 Expert 4TB
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
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
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...
3
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(); ...
5
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
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...
0
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...
0
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: ...
2
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: ...
3
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...
19
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...
3
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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 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.