codeatdusk
  • codeatdusk
  • 50.25% (Neutral)
  • Newbie Topic Starter
11 years ago
fghfgd
ivan
  • ivan
  • 100% (Exalted)
  • Administration
11 years ago

Hi, if you want to send multiple emails concurrently.
I strongly suggest that you use FastSender, please have a look at this topic:

http://www.emailarchitect.net/easendmail/kb/vb.aspx?cat=12 

it doesn't require you create multiple form, you can also find the full sample project in installation path\Samples_VB6\mass.vb6.

Secondly, if you really need to create multiple form to send email, could you send your project to support@emailarchitect.net so that we can have a debug and find the problem.

codeatdusk
  • codeatdusk
  • 50.25% (Neutral)
  • Newbie Topic Starter
11 years ago
i sent an email with more info
ivan
  • ivan
  • 100% (Exalted)
  • Administration
11 years ago

Even with FastSender it appears that it only handles 1 SMTP account and 1 proxy at a time, rather than, for example, 300 accounts running on 300 different proxies simultaneously

Is there a workaround for that?

Originally Posted by: codeatdusk 




Sure FastSender can handle the multiple SMTP accounts, it is designed for that.
But in our example code, it uses only one SMTP account.

See the following example codes, it demonstrates how to handle multiple SMTP accounts:


Option Explicit

Private WithEvents m_oFastSender As EASendMailObjLib.FastSender
Private oSmtp As EASendMailObjLib.Mail

Private Sub Command1_Click()
Dim recipientAddr(3) As String
Dim froms(3) As String
Dim servers(3) As String
Dim users(3) AS String
Dim passwords(3) As String


recipientAddr(0) = "test@adminsystem.com"
recipientAddr(1) = "test1@adminsystem.com"
recipientAddr(2) = "test2@adminsystem.com"

froms(0) = "from@adminsystem.com"
froms(1) = "from1@adminsystem.com"
froms(2) = "from2@adminsystem.com"

servers(0) = "smtp.adminsystem.com"
servers(1) = "smtp1.adminsystem.com"
servers(2) = "smtp2.adminsystem.com"

users(0) = "from@adminsystem.com"
users(1) = "from1@adminsystem.com"
users(2) = "from2@adminsystem.com"

passwords(0) = "password"
passwords(1) = "password1"
passwords(2) = "password2"

Dim i As Integer

If m_oFastSender Is Nothing Or oSmtp Is Nothing Then
Set m_oFastSender = New EASendMailObjLib.FastSender
Set oSmtp = New EASendMailObjLib.Mail
oSmtp.LicenseCode = "TryIt"
' Set the maximum no. of worker threads
m_oFastSender.MaxThreads = 10
End If



For i = 0 To 2
' Your sender email address
oSmtp.FromAddr = froms(i)

' Your SMTP server address
oSmtp.ServerAddr = servers(i)

' User and password for ESMTP authentication, if your server doesn't require
' User authentication, please remove the following codes.
oSmtp.UserName = users(i)
oSmtp.Password = passwords(i)

' If your smtp server requires SSL connection, please add this line
' oSmtp.SSL_init

oSmtp.ClearRecipient
oSmtp.AddRecipientEx recipientAddr(i), 0
oSmtp.Subject = "mass email test subject"
oSmtp.BodyText = "mass email test body sent from vb"
Call m_oFastSender.Send( oSmtp, i, "any" )
Next

End Sub

Private Sub m_oFastSender_OnSent(ByVal lRet As Long, _
ByVal ErrDesc As String, _
ByVal nKey As Long, _
ByVal tParam As String, _
ByVal Sender As String, _
ByVal Recipients As String)
If lRet = 0 Then
MsgBox nKey & " email was sent successfully"
Else
MsgBox nKey & ": failed to send email: " & ErrDesc
End If
End Sub
ivan
  • ivan
  • 100% (Exalted)
  • Administration
11 years ago

i sent an email with more info

Originally Posted by: codeatdusk 




I will check it today.
ivan
  • ivan
  • 100% (Exalted)
  • Administration
11 years ago

Additionally, how difficult would it be for you guys to compile a version of EASendmail that could be added as a component?

Then I could just do

For I = 1 to 50
Load EASendmail(I)
Next

then click on the EASendmail icon on the form an add code that way. WODHTTP works like that. That's what I use for handling port 80 SSL on vb6 instead of mswinsck.ocx which is also similar to wodhttp in that it runs asynchronous Index arrays

Originally Posted by: codeatdusk 




Because EASendMail is a component, it is not a VB ocx (ocx cannot be used in ASP/VBSCRIPT), so it doesn't support control array. But FastSender is totally suitable for your case, please check it out.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.