Click to See Complete Forum and Search --> : Need advice on SMTPsvg asp.net email


Mike Pliam
June 8th, 2009, 11:50 AM
Many hours spent trying to implement email on my asp.net website. My host server insists on using SMTPsvg dll and makes it available, but I cannot use that one on my local host developer machine(s).

Problems:
1 - Cannot find a free SMTPsvg dll to download that will work on my local machine in order to develop the site before publication. Downloaded SMTPSVG.DLL from here :

http://digilander.libero.it/nannib/download.htm

but when I try to locally reference it, message responds 'Cannot ... no type library...'.

2 - My current site was built using C#. My host server provides only the following instructions in VB.


Open your code behind file (i.e., the filename.aspx.vb file) in VS.NET and add "Imports SMTPsvg" to the top of the
file, above everything else.

Here is the actual code that is sending mail (this example is in VB.NET):

Dim strText As String
strText = "This is a test message"

'Create Mail Object from the ASPMail component

Dim objMail As New SMTPsvg.MailerClass()

objMail.RemoteHost = "scriptmail.intermedia.net"
objMail.ContentType = "text/plain"

'Set this to text/html for HTML mail

objMail.FromName = "Your Name"
objMail.FromAddress = "mailbox@yourdomain.name"
objMail.ReplyTo = "mailbox@yourdomain.name"
objMail.Subject = "This is a test message"
objMail.AddRecipient("Recipient Name", "recipient@theirdomain.name")
objMail.BodyText = strText
objMail.SendMail()


Since there is no available underlying code on the host server website since it is already compiled, I think I will have to completely rebuild that site on a local developer machine in order to edit underlying code (I have lost the original development project!) Further frustration is that I need to do this 'rebuild' for several different development machines (Win2k, WinXP, Vista) from scratch, as the projects will not readily copy from one machine to another.

3 - I need the script and/or underlying code in C# to implement this.

Any suggestions greatly appreciated. :wave: