UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Windows Reseller Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-10-2007, 21:49
Junior Member
 
Join Date: Oct 2007
Posts: 17
Default ASP mail problems

Hi

Just joined Eukhost and having difficulty with mail via an asp prog. This is it:

Imports System.Net.Mail
Imports System.Net.NetworkCredential
Partial Class content_infopages_contact
Inherits System.Web.UI.Page
Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_submit.Click
Dim MessageSubjectWithID As String = EmailSubject.Text & " - Via contact page."
Dim maMailfrom As New MailAddress(EmailSenderAddress.Text, EmailSenderName.Text)
Dim maMailTo As New MailAddress("divine@image-machine.com", "Paul")
Dim mmEmail As New MailMessage(maMailfrom, maMailTo)
mmEmail.IsBodyHtml = False
mmEmail.Subject = MessageSubjectWithID
mmEmail.Body = EmailMessage.Text
Try
Dim smtpSend As New SmtpClient("mail.image-machine.com")
Dim credLogin As System.Net.NetworkCredential = New System.Net.NetworkCredential("divine@image-machine.com", "PASSWORD")
smtpSend.Credentials = credLogin
smtpSend.Send(mmEmail)
Catch ex As Exception
EmailError.Text = ex.ToString
End Try
End Sub
Sub Reset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_submit.Click
Response.Redirect("contact.aspx")
End Sub
End Class

I'm using the same username/password as those that work in my Outlook config, but I'm getting no mail from the above.

Any ideas, please?

-Paul
Reply With Quote
  #2 (permalink)  
Old 10-10-2007, 22:59
System Administrator
 
Join Date: Dec 2006
Location: localhost
Posts: 684
Lightbulb

Hi Paul,

I have placed a sample ASP.Net Mailing script [simple.aspx] exactly in the same folder where your contact page is eg: http://image-machine.com/xxx/xxx/simple.aspx
PHP Code:
<% @Page Language="C#" %>
<% @
Import Namespace="System.Web.Mail" %>
<%
string strTo "divine@image-machine.com";
string strFrom "divine@image-machine.com";
string strSubject "Test";
SmtpMail.SmtpServer "mail.image-machine.com";
SmtpMail.Send(strFromstrTostrSubject,
  
"This is a test email sent from the web :O)");
Response.Write("Mail sent successfully !");
%> 
I've tested it & emails are delivered successfully to your mailbox. To be honest, I'm not a programmer, so it'd be somewhat difficult for me to debug & get your designed script working... I'm sure someone here will help you out of this
__________________

Rock _a.k.a._ Jack L.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
||
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
  #3 (permalink)  
Old 11-10-2007, 11:09
Junior Member
 
Join Date: Oct 2007
Posts: 17
Default

Thank you, Rock.

I changed my VB to C (there's a first time for everything!) using your script as a basis and now it works! I really appreciate that you tried out your solution using my website hosting - Really excellent service!

-Paul
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 16:06.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles