Hi,
I am trying to send Mail from VB.net app but I can not do
it. Even I can not do this = Imports system.mail, the mail
option is not available. I also have to do more then one
atachements. Some one please help.
Thanks,
mashraf 6 2817
Mahsraf,
You need to include System.Web.Mail. Then you can create and populate a
MailMessage object and send it using the system SmtpServer object.
Here's a C# code snippet of mine. The VB is quite similar.
--mark richter
using System.Web.Mail;
..
..
..
SmtpMail.SmtpServer = "smtp.foo.net";
MailMessage mail = new MailMessage();
mail.To = "he**@foosoft.com";
mail.From = custEmail.Text;
mail.Subject = "Request";
mail.Body = custName.Text + "\n\n" + custPhone.Text + "\n\n" +
custDescription.Text;
SmtpMail.Send(mail);
mashraf wrote: Hi, I am trying to send Mail from VB.net app but I can not do it. Even I can not do this = Imports system.mail, the mail option is not available. I also have to do more then one atachements. Some one please help.
Thanks, mashraf
Mahsraf,
You need to include System.Web.Mail. Then you can create and populate a
MailMessage object and send it using the system SmtpServer object.
Here's a C# code snippet of mine. The VB is quite similar.
--mark richter
using System.Web.Mail;
..
..
..
SmtpMail.SmtpServer = "smtp.foo.net";
MailMessage mail = new MailMessage();
mail.To = "he**@foosoft.com";
mail.From = custEmail.Text;
mail.Subject = "Request";
mail.Body = custName.Text + "\n\n" + custPhone.Text + "\n\n" +
custDescription.Text;
SmtpMail.Send(mail);
mashraf wrote: Hi, I am trying to send Mail from VB.net app but I can not do it. Even I can not do this = Imports system.mail, the mail option is not available. I also have to do more then one atachements. Some one please help.
Thanks, mashraf
Mahsraf,
You need to include System.Web.Mail. Then you can create and populate a
MailMessage object and send it using the system SmtpServer object.
Here's a C# code snippet of mine. The VB is quite similar.
--mark richter
using System.Web.Mail;
..
..
..
SmtpMail.SmtpServer = "smtp.foo.net";
MailMessage mail = new MailMessage();
mail.To = "he**@foosoft.com";
mail.From = custEmail.Text;
mail.Subject = "Request";
mail.Body = custName.Text + "\n\n" + custPhone.Text + "\n\n" +
custDescription.Text;
SmtpMail.Send(mail);
mashraf wrote: Hi, I am trying to send Mail from VB.net app but I can not do it. Even I can not do this = Imports system.mail, the mail option is not available. I also have to do more then one atachements. Some one please help.
Thanks, mashraf
Mahsraf,
You need to include System.Web.Mail. Then you can create and populate a
MailMessage object and send it using the system SmtpServer object.
Here's a C# code snippet of mine. The VB is quite similar.
--mark richter
using System.Web.Mail;
..
..
..
SmtpMail.SmtpServer = "smtp.foo.net";
MailMessage mail = new MailMessage();
mail.To = "he**@foosoft.com";
mail.From = custEmail.Text;
mail.Subject = "Request";
mail.Body = custName.Text + "\n\n" + custPhone.Text + "\n\n" +
custDescription.Text;
SmtpMail.Send(mail);
mashraf wrote: Hi, I am trying to send Mail from VB.net app but I can not do it. Even I can not do this = Imports system.mail, the mail option is not available. I also have to do more then one atachements. Some one please help.
Thanks, mashraf
Thanks Mark,
I did not refrence the mail class. Your code snipet worked
fine. Thanks again.
Mashraf -----Original Message----- Mahsraf,
You need to include System.Web.Mail. Then you can create
and populate aMailMessage object and send it using the system
SmtpServer object.Here's a C# code snippet of mine. The VB is quite similar.
--mark richter
using System.Web.Mail; .. .. .. SmtpMail.SmtpServer = "smtp.foo.net"; MailMessage mail = new MailMessage(); mail.To = "he**@foosoft.com"; mail.From = custEmail.Text; mail.Subject = "Request"; mail.Body = custName.Text + "\n\n" +
custPhone.Text + "\n\n" +custDescription.Text;
SmtpMail.Send(mail); mashraf wrote:
Hi, I am trying to send Mail from VB.net app but I can not
do it. Even I can not do this = Imports system.mail, the
mail option is not available. I also have to do more then
one atachements. Some one please help.
Thanks, mashraf
.
Thanks Mark,
I did not refrence the mail class. Your code snipet worked
fine. Thanks again.
Mashraf -----Original Message----- Mahsraf,
You need to include System.Web.Mail. Then you can create
and populate aMailMessage object and send it using the system
SmtpServer object.Here's a C# code snippet of mine. The VB is quite similar.
--mark richter
using System.Web.Mail; .. .. .. SmtpMail.SmtpServer = "smtp.foo.net"; MailMessage mail = new MailMessage(); mail.To = "he**@foosoft.com"; mail.From = custEmail.Text; mail.Subject = "Request"; mail.Body = custName.Text + "\n\n" +
custPhone.Text + "\n\n" +custDescription.Text;
SmtpMail.Send(mail); mashraf wrote:
Hi, I am trying to send Mail from VB.net app but I can not
do it. Even I can not do this = Imports system.mail, the
mail option is not available. I also have to do more then
one atachements. Some one please help.
Thanks, mashraf
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Samia |
last post by:
I have an application running on a single workstation (win 2000) with
Outlook installed and a profile create using and exchange server with
authentification through the DNS. This user profile is...
|
by: CK |
last post by:
Hi all,
I know this question is stupid. But i need some advice for this. I
am trying to develop a website, which will allow the user send to order form
to the admin email. I am planning to use the...
|
by: mashraf |
last post by:
Hi,
I am trying to send Mail from VB.net app but I can not do
it. Even I can not do this = Imports system.mail, the mail
option is not available. I also have to do more then one
atachements. Some...
|
by: Kurien Baker Fenn |
last post by:
How to send data from an ASP form to a visual basic form?
Please help
|
by: MLH |
last post by:
I want to send 2 reports using SendObject.
Something like this would do nicely...
DoCmd SendObject A_REPORT, "rpt1";"rpt2", A_FORMATRTF, MyRecip, , ,
MySubject, MyBodyText, 0
....except for...
|
by: Dennis |
last post by:
I am trying to send an e-mail using one of the examples I got on this group
as follows: (both toemail and myemail are valid e-mail addreses.
'System.Web.Mail' (requires reference to...
|
by: Walter CF |
last post by:
Hi, I develop an application that send mail using system.web.mail
namespace, It work without problems over Windows Xp, but in windows 98
it dont't work, I've
read from...
|
by: cj |
last post by:
How can I get a button in VB to send the contents of a text box via
email in a manner similar to the "Send To\Mail Recipient" functionality
that you can select via right clicking a file in Windows...
|
by: mse07 |
last post by:
hi for everyone
if i send e-mail by visual basic from outlook ,
before outlook complete sending the message it shows message box contain following text :
A program is trying to...
|
by: yusufjammy |
last post by:
how to send mail with visual basic 2008 to gmail id.
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |