473,785 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

smtpserver

I have an email function in a vb.net client application that I’m having
trouble with.

Instead of using the smtpserver that I assign it, it insists on using the
local smtpserver. If I stop the local smtpserver, it will wait until I turn
it back on. It does this even when I run the application from a network
location.

I have tried assigning the remote smtpserver through both: smtpserver =
“smtpserverna me” and smtpserver.inse rt(0,”smtpser vername”).

The from and to seem to be all right, as the process runs successfully thru
the local smtpserver. I have tried different domain values for both from and
to addresses.

try/catch is not catching an error.

Dim email As New System.Web.Mail .MailMessage
email.To = LCase(strTo)
email.From = LCase(strFrom)
email.Subject = Trim(strSubject )
email.Body = Trim(strBody)

Try
System.Web.Mail .SmtpMail.SmtpS erver.Insert(0,
"smtpservername here")
System.Web.Mail .SmtpMail.Send( email)
Catch ex As Exception
‘ error processing here, displays error and innerexception
End Try

I could really use some help here.

thanks.
Sep 2 '05 #1
3 3133
Hi,

Use some smtp client what sends messages without local smtpserver or what
delivers messages directly.

There are lots of such components for free.

you can try: http://www.lumisoft.ee/lswww/downloa...oads/Examples/
"David" <Da***@discussi ons.microsoft.c om> wrote in message
news:17******** *************** ***********@mic rosoft.com...
I have an email function in a vb.net client application that I'm having
trouble with.

Instead of using the smtpserver that I assign it, it insists on using the
local smtpserver. If I stop the local smtpserver, it will wait until I
turn
it back on. It does this even when I run the application from a network
location.

I have tried assigning the remote smtpserver through both: smtpserver =
"smtpservername " and smtpserver.inse rt(0,"smtpserve rname").

The from and to seem to be all right, as the process runs successfully
thru
the local smtpserver. I have tried different domain values for both from
and
to addresses.

try/catch is not catching an error.

Dim email As New System.Web.Mail .MailMessage
email.To = LCase(strTo)
email.From = LCase(strFrom)
email.Subject = Trim(strSubject )
email.Body = Trim(strBody)

Try
System.Web.Mail .SmtpMail.SmtpS erver.Insert(0,
"smtpservername here")
System.Web.Mail .SmtpMail.Send( email)
Catch ex As Exception
' error processing here, displays error and innerexception
End Try

I could really use some help here.

thanks.

Sep 4 '05 #2
Did you try:

SmtpMail.SmtpSe rver = <your server name or IP address>

http://msdn.microsoft.com/library/de...ervertopic.asp

I don't know where you got the .Insert method from...it's not documented
on MSDN.

David wrote:
I have an email function in a vb.net client application that I’m having
trouble with.

Instead of using the smtpserver that I assign it, it insists on using the
local smtpserver. If I stop the local smtpserver, it will wait until I turn
it back on. It does this even when I run the application from a network
location.

I have tried assigning the remote smtpserver through both: smtpserver =
“smtpserverna me” and smtpserver.inse rt(0,”smtpser vername”).

The from and to seem to be all right, as the process runs successfully thru
the local smtpserver. I have tried different domain values for both from and
to addresses.

try/catch is not catching an error.

Dim email As New System.Web.Mail .MailMessage
email.To = LCase(strTo)
email.From = LCase(strFrom)
email.Subject = Trim(strSubject )
email.Body = Trim(strBody)

Try
System.Web.Mail .SmtpMail.SmtpS erver.Insert(0,
"smtpservername here")
System.Web.Mail .SmtpMail.Send( email)
Catch ex As Exception
‘ error processing here, displays error and innerexception
End Try

I could really use some help here.

thanks.

Sep 4 '05 #3
An Example that works fine:

sTo = de************* *@destination.c om

sFrom = "in*******@fake .com";

sSubject = "Fake Reminder";

sBody = "";

sAttach = "";

sCc = "";

sBcc = "";

sBodyFormat = "HTML";

sBodyEncoding = Encoding.ASCII. EncodingName;

sPriority = "Normal";

sUrlContentBase = "http://www.fake.com";

sUrlContentLoca tion = "http://www.fake.com";

sMailServer = "smtp1.yourMail ServerProvider. ca";

SmtpMail.SmtpSe rver = sMailServer;

SmtpMail.Send(M yMail);

1) You can set HTML or Plain Text
2) Do not foget to add the following namespaces:

System.Web.Mail
System.Text

Hope this helps.

Marc./Toronto/Canada

----------------------
Marc. B.,BSc, MSc, BEd
Senior Software Engineer
Alliance Information Technology
www.alliance-technology.com
Herzing College - Section Head
Internet Solution Developer Program
"David" <Da***@discussi ons.microsoft.c om> wrote in message
news:17******** *************** ***********@mic rosoft.com...
I have an email function in a vb.net client application that I'm having
trouble with.

Instead of using the smtpserver that I assign it, it insists on using the
local smtpserver. If I stop the local smtpserver, it will wait until I
turn
it back on. It does this even when I run the application from a network
location.

I have tried assigning the remote smtpserver through both: smtpserver =
"smtpservername " and smtpserver.inse rt(0,"smtpserve rname").

The from and to seem to be all right, as the process runs successfully
thru
the local smtpserver. I have tried different domain values for both from
and
to addresses.

try/catch is not catching an error.

Dim email As New System.Web.Mail .MailMessage
email.To = LCase(strTo)
email.From = LCase(strFrom)
email.Subject = Trim(strSubject )
email.Body = Trim(strBody)

Try
System.Web.Mail .SmtpMail.SmtpS erver.Insert(0,
"smtpservername here")
System.Web.Mail .SmtpMail.Send( email)
Catch ex As Exception
' error processing here, displays error and innerexception
End Try

I could really use some help here.

thanks.

Sep 5 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4031
by: sampsons | last post by:
Greetings, I am using Web.Mail.Mailmessage along with Web.Mail.SmtpMail.Send(MailMessage) method Now, this sends Email using the Default SMTP server of my REMOTE HOST. Sadly I have found that many ISP's block mail sent through this method. I do have an SMTP server included in the Remote Hosting package, but that SmtpServer requires authentication of outgoing mail.
1
1768
by: Jayakumar | last post by:
HI, I am using System.web.mail class in my application to send mails. I am using SMTP server for the same. I can send mail to the intranet addresses, But when i send mails to Hotmail or other domains the mails are not sent. What should i do for the sending mails to hotmail and other accounts. (But if i have send mails to hotmail from my acount then i can send mails. ) Kindly reply for my problems.
0
1097
by: Michael Appelmans | last post by:
The SMTP server I'm trying to use requires me to pass user id and password when sending email. Does anyone know how I can set this in the SmtpMail class (c#)? Thanks for any suggestions. Michael
3
1314
by: Bob Cummings | last post by:
Greetings I hope this is the correct newsgroup. I am working on a senior project for school. One of the requirement is to have the functionality of send email reminders from our web application. No problem we thought. We set the value of smtpserver in the web.config file. That way we could develop on campus and when we went out to the company that was actually going to use this product we could just change the key in the web.config....
0
1624
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 smtpmail.smtpserver at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasssmtpservertopic.asp there is nothing documented about an insert method. Is this some generic method that's always around? Is...
1
951
by: SirPyros | last post by:
I am creating a mass mailer web app. I was wondering if there was a big performance difference between adding all of the email addresses to the mailmessage Bcc property or simply sending a new mail message for each recipient. The reason I ask if because I want to be able to add a link with the Recipient ID as a query string parameter for people to unsubscribe from the list. Only way I see of doing this is to send each email separately.
1
4184
by: Volker Jobst | last post by:
Hi, The following code works fine as long as I don't use a smtp-server which requires authentication: Sub sendMail() Dim sfrom As String = TextBox1.Text Dim sto As String = TextBox2.Text Dim ssubject As String = TextBox3.Text Dim sbody As String = RichTextBox1.Text
3
358
by: David | last post by:
I have an email function in a vb.net client application that I’m having trouble with. Instead of using the smtpserver that I assign it, it insists on using the local smtpserver. If I stop the local smtpserver, it will wait until I turn it back on. It does this even when I run the application from a network location. I have tried assigning the remote smtpserver through both: smtpserver = “smtpservername” and...
2
4698
by: destiple | last post by:
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:
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10161
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.