473,945 Members | 28,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send mail thru vb

6 New Member
Hi All,
I am trying to send an email thru vb . But whenever I try to change the smtp name to smtp.gmail.com then an error iccurs (Must issue STARTTLS command first bla bla..) can anyone plz help me.

My code is as follows:
With poSendMail
.SMTPHostValida tion = VALIDATE_NONE ' Added to remove msgs that appear inj otlook
.EmailAddressVa lidation = VALIDATE_SYNTAX ' Added to remove msgs that appear inj otlook
.Delimiter = "," ' Set any delimiter
.SMTPHost = "smtp.gmail.com "
.From = "XYZ@gmail. com"
.Password = "197400"
.FromDisplayNam e = " "
.Recipient = strMailAddress
.RecipientDispl ayName = "XXX"
.CcRecipient = ""
.CcDisplayName = ""
.BccRecipient = ""
.ReplyToAddress = ""
.Subject = "Test Mail"
.Message = "Testing to send mail thru Visual Basic Application"
' .Attachment = ""
.MaxRecipients = totMailAddress + 30
.send
End With
Oct 24 '07 #1
3 3069
shrimant
48 New Member
It basically means that gmail uses STARTTLS authentication and does not support SMTP authentication. ...
But I beleive that is not the problem in your case Google uses port 465 for SMTP communication, but no where in your code did I see the reference of a Port number. and what ever component you are using should support SSL connection because google uses SSL connection for POP3 and SMTP.
Hi All,
I am trying to send an email thru vb . But whenever I try to change the smtp name to smtp.gmail.com then an error iccurs (Must issue STARTTLS command first bla bla..) can anyone plz help me.

My code is as follows:
With poSendMail
.SMTPHostValida tion = VALIDATE_NONE ' Added to remove msgs that appear inj otlook
.EmailAddressVa lidation = VALIDATE_SYNTAX ' Added to remove msgs that appear inj otlook
.Delimiter = "," ' Set any delimiter
.SMTPHost = "smtp.gmail.com "
.From = "XYZ@gmail. com"
.Password = "197400"
.FromDisplayNam e = " "
.Recipient = strMailAddress
.RecipientDispl ayName = "XXX"
.CcRecipient = ""
.CcDisplayName = ""
.BccRecipient = ""
.ReplyToAddress = ""
.Subject = "Test Mail"
.Message = "Testing to send mail thru Visual Basic Application"
' .Attachment = ""
.MaxRecipients = totMailAddress + 30
.send
End With
Oct 24 '07 #2
Johnny Mar
2 New Member
I am also new to VB .NET. Is There a VB method available that will return a an application users e-mail provider information, eliminating the need to input the SMTP Server IP information?

I am worrying about deployment. Many users of this application, including myself, find it difficult to lookup SMTP Information to provide to the application, in order to have the e-mail functionality work properly.
Oct 25 '07 #3
shrimant
48 New Member
I am also new to VB .NET. Is There a VB method available that will return a an application users e-mail provider information, eliminating the need to input the SMTP Server IP information?

I am worrying about deployment. Many users of this application, including myself, find it difficult to lookup SMTP Information to provide to the application, in order to have the e-mail functionality work properly.
Actually Outlook 2007 does it...when you create a new account in Outlook 2007..allyou need to do is provide your complete email address and then Outlook fills all the rest for you.
Oct 26 '07 #4

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

Similar topics

40
11954
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client
11
5046
by: Tim Smallwood | last post by:
Hi, I have an Access project that I use to allow a client to hit an SQL server at my host. This project has several forms that are used to udpate tables, etc, but I'd also like to be able to include the ability to allow my client to send an email to everyone that has subscribed to our web site by going to the table that contains the names and email addy's and then loop thru the same and send an email to them all by appending their...
4
1635
by: herbert | last post by:
sendmail in .NET 2.0 is as useless as it was in .NET 1.x I can't find out how to make it work. Not to mention how to write a setup project that tests/installs its requirements correctly. the difference to previous version is that .NET 1.x gave no error message at all and .NET 2.0 gives useless error message when sendmail fails. why is Microsoft not able to ship a sendmail class that works out of the box at least with their own...
0
1683
by: Dave S | last post by:
I have a lot of forms on our web site that require the user to fill out information and submit it back to us. currently the information comes back as name value pair. The our employee's then has to go thru all this code and fill in a template with the data and print the info out. It would be so much easier if we could have a button that would access the file/send/page by email button on IE. Using asp.net 2 the my.computer.keyboard.sendkey...
3
1669
by: Dave | last post by:
I am trying to write code to help me send an email. I have the email address to sent to, stored in a database. I've read several articles and I'm not sure what is meant by placing "yourmailserver" as a value. I plan to distribute this program to several users. They could be using Yahoo, Hotmail, POP 3 or SMTP. So I cannot hardcode the mailserver name. Is there some generic mailserver? I have seen some use of localhost as mail server. Is...
3
3126
by: crossroadsk | last post by:
<pre> Hi all, I'm new to Javamail concept and i got the following exceptions when i tried to send a simple mail. First exception is : using java Could not connect to SMTP host: smtp.gmail.com, port: 25; Second Exception is : java.net.SocketException: Software caused connection abort: connect
3
4321
by: Aaronindm | last post by:
I have used DoCmd.SendObject to send an e-mail through Access. Now I am looking for a way to attach a file (e.g. PDF file) to that document. I think this is possible using Outlook but cannot find anything that is compatible with Groupwise - can anyone offer any help?
2
943
by: winbala | last post by:
Hi Friends,, I have developed in my project c# .net . windows application. i will send any mail thru my application. i dont know.. any other know tell me.. give code. Regards,
1
2946
by: rag84dec | last post by:
Hi, THe mail sent through the ASP code given below is going to "Queue" folder in "C:\Inetpub\mailroot"...And the code is Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Subject" objMessage.from = "some@gmail.com" objMessage.To = "some@gmail.com" objMessage.TextBody = "e-mail message" objMessage.Send
0
10149
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11140
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
10679
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
8239
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
7402
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
6315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4927
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
4520
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3523
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.