473,698 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do we need IIS for sending mails from an Vb.Net applications

8 New Member
Hi to every one,
I am having a problem while sending mail from my application. iI want to send mail from my Vb.Net applications. and it is working fine in my system, but the problem is that when i try to run tha same application from another system where there is no iis installed, its giving me error mail not sent, and when i change the DeliveryMethod to network , giving me tha same problem...
So can anyone help me out with this problem..
The code is as below.
Public pInPassword As String
Public pOutMailId As String
Private Sub btnSend_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnSend.Click
Try
'err msg = Request for the permission of type 'System.net.mai l.smtpPermissio n, system, Version=2.0.0.0 , Culture=neutral , PublicKey token= b77a5c561934e08 9' failed
Dim msg As System.Net.Mail .MailMessage
Dim objSmtp As New System.Net.Mail .SmtpClient("65 .175.81.34")
msg = New System.Net.Mail .MailMessage(tx tFrom.Text, txtTo.Text, txtSub.Text, txtBody.Text)
msg.IsBodyHtml = True
If check() = True Then
objSmtp.Credent ials = New System.Net.Netw orkCredential(t xtFrom.Text, txtPassword.Tex t, "65.175.81. 34")
objSmtp.Deliver yMethod = SmtpDeliveryMet hod.SmtpDeliver yMethod.Network
objSmtp.Send(ms g)
MessageBox.Show ("Mail Sent Successfully... .")
ClearForm()
End If

Catch ex As Exception
MessageBox.Show (ex.Message)
End Try


Thank you in advance.
Deepak
May 16 '07 #1
5 3635
dip_developer
648 Recognized Expert Contributor
Hi to every one,
I am having a problem while sending mail from my application. iI want to send mail from my Vb.Net applications. and it is working fine in my system, but the problem is that when i try to run tha same application from another system where there is no iis installed, its giving me error mail not sent, and when i change the DeliveryMethod to network , giving me tha same problem...
So can anyone help me out with this problem..
The code is as below.
Public pInPassword As String
Public pOutMailId As String
Private Sub btnSend_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnSend.Click
Try
'err msg = Request for the permission of type 'System.net.mai l.smtpPermissio n, system, Version=2.0.0.0 , Culture=neutral , PublicKey token= b77a5c561934e08 9' failed
Dim msg As System.Net.Mail .MailMessage
Dim objSmtp As New System.Net.Mail .SmtpClient("65 .175.81.34")
msg = New System.Net.Mail .MailMessage(tx tFrom.Text, txtTo.Text, txtSub.Text, txtBody.Text)
msg.IsBodyHtml = True
If check() = True Then
objSmtp.Credent ials = New System.Net.Netw orkCredential(t xtFrom.Text, txtPassword.Tex t, "65.175.81. 34")
objSmtp.Deliver yMethod = SmtpDeliveryMet hod.SmtpDeliver yMethod.Network
objSmtp.Send(ms g)
MessageBox.Show ("Mail Sent Successfully... .")
ClearForm()
End If

Catch ex As Exception
MessageBox.Show (ex.Message)
End Try


Thank you in advance.
Deepak
check Whether SMTP mail server is configured on that particular machine or not...
May 16 '07 #2
dskinibbyb
8 New Member
check Whether SMTP mail server is configured on that particular machine or not...
Hi dip_developer,
I asked my system Admin, and he said that smtp server is configured in server itself and he has given my the same Ip address of the smtp server so no need to configure the server..
Can you tell me what else i have to check?
this problem is really making me crazy.
thanks.
May 16 '07 #3
dip_developer
648 Recognized Expert Contributor
Look at this

SMTP Server Set up
May 16 '07 #4
dskinibbyb
8 New Member
Look at this

SMTP Server Set up
SO without IIS i wont be able to send mail's isnt it?.
il try to install IIs and check my application.
Then all clients using this windows application must have IIS?
Thanks
May 16 '07 #5
dskinibbyb
8 New Member
SO without IIS i wont be able to send mail's isnt it?.
il try to install IIs and check my application.
Then all clients using this windows application must have IIS?
Thanks
hi dip_developer
My problem got solved....
Actually that machine dint had default gateway... and when i configured the gateway its working now...
Thanks...
May 16 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
6515
by: Good Man | last post by:
Hi I'm building a 'job posting' site of sorts. When a job is available in a particular state, I want the system to send an email to everyone who is 'watching' that state. I know how to do this, but I need to figure out a way to 'send the emails in the background' - ie: if an administrator adds a job to Wyoming, I don't want them to have to wait for the php script to finish selecting and e-
1
1765
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.
7
3517
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server administrator told me to write the emails to the “pickup directory” instead. I know that JMail can do this in ASP, but how do you do this in asp.net? -- --------------------
3
3611
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is smtpMail.Send("from@here.com", to@there.com, "Message subject", "Message Body") I'm sending it to my own email address on a different server using a dummy
1
1634
by: Dirk Goossens | last post by:
Hello! I'm sending E-mails to mailadresses in a table, using the code below. How can I send more than one attachment? Access can find the file to be send in this field: MY_EMAILATTACHMENT_FIELD I have also a field with the name MY_EMAILATTACHMENT_FIELD2 Combining the field names with an &-sign doesn't work, even when I put a ; in between. Thanks for a helping hand!
8
2845
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great Now i work in a company with a MS exchange server and would like to send some e-mails however i can`t get it to work at all error is : ( translated form the dutch language )
3
2377
by: dskinibbyb | last post by:
Hi Everybody, I am sending mail using the new class in .Net 2.0. Here while sending internal mails it is giving me problem. Carriage return, Line feed and Spaces are lost while sending mails. I am using msg.BodyEncoding = System.Text.UTF8Encoding.UTF8 to encode the body. But same code and same mail is going fine , when sent to external mails (Like gmail, yahoo, etc.) Please can anyone help me in solving my problem. I even tried...
2
1383
by: srinivaspnv21 | last post by:
hi every one, plz help me out, i have to send mails from my asp.net page.... I have tried a code where mails are going only to gmail users the code is ... namespace: using System.Web.Mail; protected void btnSend_Click(object sender, EventArgs e) {
0
8668
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
8855
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5857
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
4358
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...
0
4612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
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
2320
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1995
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.