Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Go Back  Xtreme Visual Basic Talk > > > Sending email using Remote SMTP in Visual Basic 6


Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2008, 02:17 PM
shaoun1000 shaoun1000 is offline
Regular
 
Join Date: Feb 2008
Posts: 67
Angry Sending email using Remote SMTP in Visual Basic 6


Hello,
I can write code in vb.net that can send email using smtp.gmail.com

It is hard task to send mail in visual basic 6. I found a component named vbsendmail.dll. But i can't manage it working. When i use smtp.gmail.com as SMTP Server then it returns an error:
530 5.7.0 Must issue a STARTTLS Command First. f42sm1009220rvb.9

I used both username and password correctly. This component use winsock control. I used port: 587

I can send email in vb.net using the same configuration. What is wrong? There are many gurus aroung me here. Please help me. If you need to know any additional things just ask me.

Kindest regards...
Shaoun

I think my question is how to integrate TLS command?

Last edited by shaoun1000; 04-09-2008 at 10:43 PM. Reason: Point out a question.
Reply With Quote
  #2  
Old 04-20-2008, 07:39 PM
AstroTux's Avatar
AstroTux AstroTux is offline
Junior Contributor
 
Join Date: Aug 2007
Posts: 345
Default

Hi,

Quote:
Must issue a STARTTLS Command First.
Are you? Sounds like they require TLS for authentication.

Best regards,
AstroTux.
Reply With Quote
  #3  
Old 04-20-2008, 10:19 PM
AtmaWeapon's Avatar
AtmaWeaponSending email using Remote SMTP in Visual Basic 6 AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Are you using VB6? You posted in the VB .NET portion of the forums. In VB .NET it is not a hard task to send mail and doesn't require external libraries, but that won't help you if you're using VB6, which was released before the internet got big and thus doesn't have a strong built-in networking library.

Please tell us what version you're using so we can either help you out or move this post to the correct forum (for VB6 you want to post under the forums for "Legacy VB 4/5/6")
Reply With Quote
  #4  
Old 04-21-2008, 05:27 AM
AstroTux's Avatar
AstroTux AstroTux is offline
Junior Contributor
 
Join Date: Aug 2007
Posts: 345
Default

Quote:
It is hard task to send mail in visual basic 6.
Oops - missed that! I think he's referring to VB6.

Best regards,
AstroTux.
Reply With Quote
  #5  
Old 04-27-2008, 11:52 AM
shaoun1000 shaoun1000 is offline
Regular
 
Join Date: Feb 2008
Posts: 67
Default

Hello,
I posted it in visual basic 6 communication related forum. But it was moved here. I found out my problem. I need a winsock control that can provide ssl for visual basic 6. It is hard to create such control. That is why i moved in vb.net 2 (Visual Basic 2005). Still having problem. Is there any way in Visual Basic 2005 to send mail directly without specifying SMTP Server? I tried MX Query and got result. But still not so sure about the procedure of work.
Reply With Quote
  #6  
Old 05-23-2008, 07:24 AM
SHASUNDER SHASUNDER is offline
Newcomer
 
Join Date: Feb 2006
Posts: 2
Default Instead of using vbsendmail.dll try using this code to send mail using gmail in vb6.

Instead of using vbsendmail.dll try using this code to send mail using gmail in vb6. it works good for me

Sub sendmail()
Dim iMsg As Object
Dim iConf As Object

Dim Flds As Variant

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yourmail@gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpasswordhere"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

strbody = "Your Sample message "

With iMsg
Set .Configuration = iConf
.To = sendto
.CC = ""
.BCC = ""
' Note: The reply address is not working if you use this Gmail example
' It will use your Gmail address automatic. But you can add this line
' to change the reply address .ReplyTo = "Reply@something.com"
.From = "<your mailid to be displayed as@gmail.com>"
.Subject = "subject here"
.TextBody = strbody
.Send
End With

End Sub
Reply With Quote
  #7  
Old 06-04-2008, 09:59 AM
darkforcesjedi's Avatar
darkforcesjediSending email using Remote SMTP in Visual Basic 6 darkforcesjedi is offline
Trust me, I'm an

* Expert *
 
Join Date: Apr 2001
Location: In ur base, pwnin d00dz
Posts: 1,964
Default

My experience using CDO to send mail in VB6 is that it raises errors for no reason occasionally, especially when sending several messages in rapid succession. Once you've verified that the code works, you may need to add a loop to retry if it fails, or "On Error Resume" (this will crash your app if something else in the subroutine is wrong).
__________________
To err is human; to debug, divine.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6 Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
 
Sending email using Remote SMTP in Visual Basic 6
Sending email using Remote SMTP in Visual Basic 6
 
-->