Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
codeatdusk  
#1 Posted : Thursday, April 3, 2014 5:21:46 AM(UTC)
codeatdusk

Rank: Newbie

Groups: Registered
Joined: 3/7/2014(UTC)
Posts: 2

Thanks: 2 times
fghfgd

Edited by user Saturday, April 5, 2014 4:51:21 AM(UTC)  | Reason: Not specified

ivan  
#2 Posted : Thursday, April 3, 2014 7:47:47 AM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)

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.emailarchitec...ndmail/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  
#3 Posted : Thursday, April 3, 2014 9:20:19 AM(UTC)
codeatdusk

Rank: Newbie

Groups: Registered
Joined: 3/7/2014(UTC)
Posts: 2

Thanks: 2 times
i sent an email with more info
ivan  
#4 Posted : Thursday, April 3, 2014 5:57:43 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: codeatdusk Go to Quoted Post
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?



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  
#5 Posted : Thursday, April 3, 2014 5:58:03 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: codeatdusk Go to Quoted Post
i sent an email with more info



I will check it today.
ivan  
#6 Posted : Thursday, April 3, 2014 6:22:05 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: codeatdusk Go to Quoted Post
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



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.
thanks 1 user thanked ivan for this useful post.
codeatdusk on 4/4/2014(UTC)
Users browsing this topic
Guest
Similar Topics
[Solved] Sending not till the end (EASendMail SMTP ActiveX Object)
by Computing-Froggy 3/30/2017 11:02:40 AM(UTC)
solved (EASendMail SMTP ActiveX Object)
by codeatdusk 3/7/2014 10:16:48 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.108 seconds.

EXPLORE TUTORIALS

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