Jump to content
UBot Underground

Connect to mail server with values from database file


Recommended Posts

Hi everyone, I can't seem to get the "connect to mail server" to pull the data to connect from the database file.   It DOES work when I enter the actual usernames and passwords for the email accounts, but I need to it pull it from the data file and can't figure out a way to supply it. 

 

create table from file("{$special folder("Desktop")}\\Desktop\\accounts.csv", &logins)
set(#incrementing, 0, "Global")
add list to table as column(&logins, 0, 2, %email)
add list to table as column(&logins, 0, 4, %password)
connect to mail server("POP3", $table cell(&logins, #incrementing, 2), $table cell(&logins, #incrementing, 4), "pop.domain.com", 110) {
}

 

FYI

acccounts.csv:  (here is the database layout)

Jim,Smith,jimsmith@gmail.com,jimsmith,mypassword

 

 

Any thoughts on how this can be done?

 

Thanks

 

 

 

Link to post
Share on other sites

Tried that but didn't fix the problem.  But thank you for your effort to help me.

 

I am now ready to submit a challenge to anyone to connect to an email server using variables.  I don't think it is possible, but I want to be proven wrong:

 

Here is an example that is not throwing any errors, but does not show email server connection in debugger:

 

add list to list(%email, $list from file("{$special folder("Desktop")}\\test\\username.txt"), "Delete", "Global")
add list to list(%password, $list from file("{$special folder("Desktop")}\\test\\password.txt"), "Delete", "Global")
set(#email, $list item(%email, 0), "Global")
set(#password, $list item(%password, 0), "Global")
connect to mail server("POP3", $list item(%email, 0), $list item(%password, 0), "pop.emailserver.com", 110) {
}

 

 

I hope there is a way to connect to email server via variables, but the above example seems to be demonstrating it is not possible.  My guess is that have yet to code this into Ubot and presently requires inputs of actual password and username to work.

Link to post
Share on other sites

Opps sorry missed one

 

create table from file("{$special folder("Desktop")}\\Desktop\\accounts.csv", &logins)

 

Also remove the second \\Desktop

 

I’m surprised you did not get a error message for the file path 

Link to post
Share on other sites

Yes, path errors will always cause a script to work.   However, even when corrected, I am not able to connect to email server using variables.   I have yet to see anyone demonstrate that it is possible.  And if it is, I would love to know what I am doing wrong in the code to connect using variables rather than having the actual "username" and "password" in quotes to connect.

 

Is UBOT simply not coded to connect to mail server using variables for username and password?

Link to post
Share on other sites

I am using 5.0 and also talking with support about this.   I will post when resolved.   Also, if any of you know how to code this with variables successfully, please let me know.

 

Thank you.

Link to post
Share on other sites
  • 2 weeks later...

alexb, the email commands work just fine. I did run into similar issue that you are facing but make sure that you trim your variables before passing to the function.

 

Make sure you $trim all of your values including the username, password...etc.

 

e.g.:

 

            set(#RecipientFirstName$trim($table cell(&Recipients, 0, 0)), "Global")
            set(#RecipientLastName$trim($table cell(&Recipients, 0, 1)), "Global")
            set(#RecipientFullName$trim($table cell(&Recipients, 0, 2)), "Global")
            set(#RecipientEmail$trim($table cell(&Recipients, 0, 3)), "Global")
            set(#StatsMonitor"Processing recipient {#RecipientFullName} ( {#RecipientEmail} )""Global")
            if($comparison(#EmailService"=""GMAIL")) {
                then {
                    connect to mail server("SMTP With SSL"#EmailUsername#EmailPassword"smtp.gmail.com", 465) {
                        send email(#RecipientEmail#EmailSubject"Plain Text"#EmailContent"""""")
                    }
                }
            }

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...