Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:41:02+00:00 2026-05-26T02:41:02+00:00

<% Dim sent Dim YourName Dim YourEmail Dim YourMessage Set myMail2=CreateObject(CDO.Message) YourName = Trim(Request.Form(Name))

  • 0
    <%
Dim sent
Dim YourName
Dim YourEmail
Dim YourMessage
Set myMail2=CreateObject("CDO.Message")
YourName = Trim(Request.Form("Name")) 
YourEmail = Trim(Request.Form("Email")) 
YourMessage = Trim(Request.Form("Message")) 

Dim Body
Dim body2
Body = Body & "Their Name: " & VbCrLf & YourName & VbCrLf & VbCrLf
Body = Body & "Their Email: " & VbCrLf & YourEmail & VbCrLf & VbCrLf
Body = Body & "Their Message: " & VbCrLf & YourMessage & VbCrLf & VbCrLf

Set myMail=CreateObject("CDO.Message")
myMail.Subject="A New Enquiry!"
myMail.From="admin@musicalmatters.co.uk"
myMail.To="james@devine.eu"
myMail.TextBody=Body
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.1and1.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing



body2="Thank you for contacting us!" & VbCrLf & "This is just a brief message to let you know your form was submitted successfully!"& VbCrLf & VbCrLf & "You may reply to this address, but you may not necessarily receive a reply, "& "you should receive a reply in 1-2 business day(s)!"& VbCrLf & "Thank you very much,"& VbCrLf & VbCrLf & "Musical Matters."& VbCrLf & "admin@musicalmatters.co.uk"

Set myMail2=CreateObject("CDO.Message")
myMail2.Subject="Thanks for Contacting Us!"
myMail2.From="admin@musicalmatters.co.uk"
myMail2.To=YourEmail
myMail2.TextBody=body2 

myMail2.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail2.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.1and1.com"
'Server port
myMail2.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail2.Configuration.Fields.Update
myMail2.Send

If myMail2.Send="" Then 
Response.Redirect("http://www.musicalmatters.co.uk/success.htm")
set myMail2=nothing

Else
Response.Redirect("http://www.musicalmatters.co.uk/error.htm")
set myMail2=nothing
End If

The problem with my asp script is that I need to check whether the emails were sent or not and redirect them to an error or success page depending on the result.

    If myMail2.Send="" Then 
Response.Redirect("http://www.musicalmatters.co.uk/success.htm")
set myMail2=nothing

Else
Response.Redirect("http://www.musicalmatters.co.uk/error.htm")
set myMail2=nothing
End If

in the code above mymail2.Send=”” because i was testing something, i know i have to change the value to true or false, please be hasty with your answers!

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:41:03+00:00Added an answer on May 26, 2026 at 2:41 am

    If the email address has valid syntax and the SMTP server is up and running, the Send method will never throw error, even if the email address does not exist.

    There is no way to know 100% if the email reached its destination – one thing I can think is to check (using FSO) the BadMail and Queue folders in the SMTP root after few seconds from sending, and if they contain new entry it means something went wrong.

    However as you’re using external mail service, you’ll have to contact them and ask for a way to get notified somehow when the delivery fails.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

dim shell,x,y x=D:\d y=c.bat & x set shell=createobject(wscript.shell) shell.run y shell.run a.bat set shell=nothing
I want to display the User's name in email. I have successfully sent an
The SQL: dim sql sSql = SELECT * FROM [dbo].[table] WHERE [sent] = 1
If I've queued up some email to be sent via the System.Net.Mail.SMTPClent, where can
I am trying to send an email through following code CODE Dim MyMailMessage As
using the Code Snippet for sending email in VB.Net I have successfully sent an
Dim classCodeDetails As List(Of ClassCodeDetail) = db.ClassCodeHeaders.Single(Function(cch) cch.CLCH_ID = classCodeHeaderId ).ClassCodeDetails.ToList() classCodeDetails.Sort(Function(c1, c2) c1.Make.MAKE_English.CompareTo(c2.Make.MAKE_English)
Dim xbg As Rm xbg.LobId = cmb_lob.SelectedValue xbg.Mobile = mobno.Text xbg.BusinessFax = faxno.Text xbg.BusinessPhone
Dim objMail As New Mail.MailMessage(no-reply@mywebsite.com, ToEmail, Password Reset, body) ...and the problem is that
Dim MyQuery = From c In xdoc.Descendants() _ Where c.Attribute(OriginY) IsNot Nothing _ Order

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.