FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Technical Support » Windows Dedicated Servers

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 05-05-11, 03:01 PM
new member
 
Join Date: Apr 2011
Posts: 6
Default Testing contact forms from temporary URL

Hi

I have had 6 different support chats since 13th April, trying to get a test contact form working, without success. This script works on my current host, but not on webhosting UK servers. Today I've been told this won't work until DNS changes have been made to point mydomain.co.uk to the new webhosting UK server. To say I'm frustrated, is a massive understatement. Surely there is some way to test contact form from a temporary URL?

Code:
<script runat="server">
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        ' send email
        
        Dim strBodyText As Object
        'build email body
        strBodyText = "Title: " & CTitle.Text & "<BR>"
        strBodyText = strBodyText & "First Name: " & FirstName.Text & "<BR>"
        strBodyText = strBodyText & "Surname: " & Surname.Text & "<BR>"
        strBodyText = strBodyText & "Address: " & Address.Text & " " & Address2.Text & "<BR>"
        strBodyText = strBodyText & "Telephone: " & Phone.Text & "<BR>"
        strBodyText = strBodyText & "E-Mail: " & Email.Text & "<BR>"
        
        strBodyText = strBodyText & "Message: " & Message.Text & "<BR>"
        
        strBodyText = Replace(strBodyText, "'", "'")

        
        Dim Msg As New System.Web.Mail.MailMessage

        Dim SMTPServer = "mail.domain.com"
        Msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", SMTPServer)
        Msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25)
        Msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 1)
        Msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1)
		Msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "me@mydomain.co.uk")
		Msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password") 

        Msg.From = "Website <website@domain.co.uk>"
        Msg.To = "Me <me@hotmail.com>"
        'Msg.Cc = ""
        
        Msg.Subject = "Test"

        Msg.BodyEncoding = System.Text.Encoding.UTF8
        Msg.BodyFormat = Web.Mail.MailFormat.Html
        Msg.Body = strBodyText

        System.Web.Mail.SmtpMail.SmtpServer = SMTPServer
        System.Web.Mail.SmtpMail.Send(Msg)

        Panel1.Visible = False
        Panel2.Visible = True
    End Sub

</script>
Reply With Quote

  #2 (permalink)  
Old 08-05-11, 08:37 AM
new member
 
Join Date: Oct 2010
Posts: 5
Default

Hello,

In order to send an email from the website, the from email address should be the email address which has to hosted on the server. Also, you need to authenticate the email i.e. you need to use the email as well as password in your script . The domain has to be pointed towards the server IP address.

Regards,
Mary
Windows Support Department
Reply With Quote

  #3 (permalink)  
Old 09-05-11, 07:48 AM
new member
 
Join Date: Apr 2011
Posts: 6
Default

Quote:
The domain has to be pointed towards the server IP address.
So this means I can't test the mail service until I have made the DNS changes to point my domain name to your server? That's too much of a risk for me - what if there are problems with the script?

I have many LAMP websites that do not require DNS changes to be made to test the mail() function. Surely there must be similar funtionality in windows?
Reply With Quote

  #4 (permalink)  
Old 01-02-12, 09:02 AM
Junior Member
 
Join Date: Jan 2012
Posts: 15
Default Testing contact forms from temporary URL

the from email address should be the email address which has to hosted on the server. Also, you need to authenticate the email. thanks for share.
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 03:41 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Reseller Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials