473,378 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Email in vb.net

E-mail in vb.net

I am using following code to send e-mail. Below code is working fine in my server (192.168.10.10) but when I am using it my client machine it gives proxy error.

Server has proxy setting and user-name and password for proxy are user-name=user and password=user and main login to server to start the server is log-in name=administrator and password is admin.

Please guide me to send the e-mail from my client machine.


Expand|Select|Wrap|Line Numbers
  1. System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
  2.  
  3.  
  4.  
  5.                 mail.To.Add("trivedimca@yahoo.co.in");
  6.                  mail.Subject = "subject";
  7.  
  8.                 mail.From = new System.Net.Mail.MailAddress("fultufatak2003@gmail.com");
  9.                  mail.IsBodyHtml = true;
  10.                 mail.Body = "message";
  11.  
  12.                 System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("192.168.10.10");
  13.                 smtp.Send(mail);
Thanks,
Prashant Trivedi.
Nov 14 '08 #1
4 1059
kenobewan
4,871 Expert 4TB
I wonder if the key to understanding this question, is that the IP address acts as localhost on that machine. On another machine you will need to use a properly configured smtpclient?
Nov 14 '08 #2
SvenV
50
If I understand your post correctly the server asks for credentials.
So use the Credentials property of SmtpClient.

More info here: http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.credentials.aspx
Nov 14 '08 #3
joedeene
583 512MB
What is the error you are receiving? It doesn't seem right to just specify the IP address of the SMTP server. It seems you would have to authenticate yourself. Can you post the error you are receiving...

joedeene
Nov 15 '08 #4
kenobewan
4,871 Expert 4TB
So from the above link, an IP could work if you specified the port as well. Its easier when you have created/ are supplied with the configured smtp address, eg smtp.example.com and you don't have to specify a port.
Nov 15 '08 #5

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

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
by: BSG-SMTP-Gateway | last post by:
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: terriss@birdsall.com, q4dzsAEAAAAA@birdsall.com,...
26
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
3
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com,...
3
by: Erik Johnson | last post by:
THE GOAL: I need to send an email with a simple ASCII text body and an attached HTML file. I have scripts that send basic emails via the smtplib module that don't have any attachements and that...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
3
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this:...
27
matheussousuke
by: matheussousuke | last post by:
I'm having trouble with e-mail sending, I mean, the website is suposed to send a confirmation email after sign up, but it gets like text plain instead of HTML May someone help me, please? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.