473,385 Members | 1,492 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,385 software developers and data experts.

send mail thru vb

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
.SMTPHostValidation = VALIDATE_NONE ' Added to remove msgs that appear inj otlook
.EmailAddressValidation = VALIDATE_SYNTAX ' Added to remove msgs that appear inj otlook
.Delimiter = "," ' Set any delimiter
.SMTPHost = "smtp.gmail.com"
.From = "XYZ@gmail.com"
.Password = "197400"
.FromDisplayName = " "
.Recipient = strMailAddress
.RecipientDisplayName = "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 3038
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
.SMTPHostValidation = VALIDATE_NONE ' Added to remove msgs that appear inj otlook
.EmailAddressValidation = VALIDATE_SYNTAX ' Added to remove msgs that appear inj otlook
.Delimiter = "," ' Set any delimiter
.SMTPHost = "smtp.gmail.com"
.From = "XYZ@gmail.com"
.Password = "197400"
.FromDisplayName = " "
.Recipient = strMailAddress
.RecipientDisplayName = "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
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
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
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...
11
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...
4
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...
0
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...
3
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"...
3
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:...
3
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...
2
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. ...
1
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 =...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
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,...
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
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.