tslusny Posted May 7, 2012 Author Share Posted May 7, 2012 I modified abhi2011 method sending Email. In this case all sending is handled via Client side, so no server lags :cheesy:Credits to abhi2011 and GoldSideRequired tutorial = [http://www.touchofdeathforums.com/smf2/index.php/topic,78011.0.html](http://www.touchofdeathforums.com/smf2/index.php/topic,78011.0.html)Go to this page = [http://emailarchitect.net/downloads.aspx](http://emailarchitect.net/downloads.aspx)From there download and install "EASendMail SMTP Component" (at top)Add Reference to = "EASendMailObj ActiveX Object"Find```Private Sub txtRAccept_Click()```At top of Sub add```Dim oSmtp As New EASendMailObjLib.Mail```After```If Options.Debug = 1 Then On Error GoTo errorhandler```Add``` If Not IsConnected Then Call MsgBox("Sorry, the server seems to be down. Please try to reconnect in a few minutes or visit " & GAME_WEBSITE, vbOKOnly, Options.Game_Name) Exit Sub End If'send email oSmtp.LicenseCode = "TryIt" ' Set your Gmail email address oSmtp.FromAddr = "[email protected]" ' Add recipient email address oSmtp.AddRecipientEx Trim$(txtREmail.text), 0 ' Set email subject oSmtp.Subject = "Account Creation in " & Options.Game_Name ' Set email body oSmtp.BodyText = "An account has been recently created in our game " & Options.Game_Name & "." & vbCrLf & "Your login details are," & vbCrLf & "Username = " & Trim$(txtRUser.text) & vbCrLf & "Password = " & Trim$(txtRPass.text) & vbCrLf & "If this wasn't you please reply to this email requesting an account delete" & vbCrLf & "Thank You," & vbCrLf & Options.Game_Name & "Staff" ' Gmail SMTP server address oSmtp.ServerAddr = "smtp.gmail.com" ' If you want to use direct SSL 465 port, ' Please add this line, otherwise TLS will be used. oSmtp.ServerPort = 465 ' detect SSL/TLS automatically oSmtp.SSL_init ' Gmail user authentication should use your ' Gmail email address as the user name. ' For example: your email is "[email protected]", then the user should be "[email protected]" oSmtp.Username = "[email protected]" oSmtp.Password = "pass"```Above```Name = Trim$(txtRUser.text)```Add```If oSmtp.SendMail() = 0 Then```And finnaly above ' Error handler add End If Link to comment Share on other sites More sharing options...
abhi2011 Posted May 7, 2012 Share Posted May 7, 2012 You missed a few points.The ref should be removed from server side and the same ref should be added to client side.change the [email protected] to your Gmail ID and the Passoword to your Gmail ID password.oSmtp.Username = "[email protected]" is actually your Gmail ID so don't type in your username here.To VB6 Newbs.If you either want to change the Subject/Body type your text in quotation marks. If you want to add some variable put a space bar the end quotation the add '&' and the varialble. If you want to put a new line in the body add '&' after message and vbCrLf then again an '&' then text/variableE.GSubject =```"This is a test subject showing game name. And the game name is " & options.game_name```Body =```"Some sample text telling game name. " & options.game_name & "That is the game name. next line would be like this. " & vbCrLf & options.game_name "Now the game name will be displayed in the next line. ``` Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now