Bulk email variables

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hey coders please help to convert string to int and string to bool.

Код:
var email = (project.Variables["Email"].Value);
var emailpass = (project.Variables["EmailPass"].Value);
var emailserver = (project.Variables["EmailServer"].Value);
var emailport = (project.Variables["EmailPort"].Value);
var emailprotocol = (project.Variables["EmailProtocol"].Value);
var emailssl = (project.Variables["SslConf"].Value);

allMails = ZennoPoster.BulkMailDownload(email, 
       emailpass, emailserver, emailport, emailssl,
       ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.POP3, 
       24*100, 500, true);

Also how to insert variable there ''ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.POP3,'' <==== in pop3 in case if it is imap ?

Thanks
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
JavaScript:
int port = Convert.ToInt32(project.Variables["Email_port"].Value);
bool ssl = Convert.ToBoolean(project.Variables["Email_ssl"].Value);
var protocol = (project.Variables["Email_type"].Value.ToLower() == "imap")?
ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.IMAP:
ZennoLab.InterfacesLibrary.Enums.Email.EmailProtocol.POP3;
 
  • Спасибо
Реакции: KitKat21

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)