void SettingsEmail::slotCheckEmail() { EMAIL_SETTINGS_T email; email.host = ui_email->host->text(); email.port = ui_email->port->value(); email.ssl = ui_email->ssl->isChecked(); email.auth = ui_email->auth->isChecked(); email.username = ui_email->username->text(); email.password = ui_email->password->text(); email.sender = ui_email->sender->text(); email.recipients = ui_email->recipients->text(); email.subject = ui_email->subject->text(); email.texteditor = ui_email->texteditor->toHtml(); QString attachment; for (int i = 0; i < ui_email->attachments->count(); ++i) { email.attachments.append(attachment); email.attachments[i] =ui_email->attachments->item(i)->text(); } SendEmail *sendemail = new SendEmail(&email); sendemail->sendEmail(&email); if(email.enable) ui_email->pushButtonOK->setEnabled (true); QMessageBox errMessage ; errMessage.setText(email.error); errMessage.exec(); }
void AddressBook::slotEmail() { SendEmail* window = new SendEmail(_main); window->show(); Id card_id = currentId(); if (card_id != INVALID_ID) window->setCard(card_id); }
void CustomerMaster::slotEmail() { if (!saveItem(true)) return; Company company; _quasar->db()->lookup(company); SendEmail* email = new SendEmail(_main); email->setCard(_curr.id()); email->show(); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); SendEmail form (NULL); form.setWindowTitle("SmtpClient for Qt - Demo 2"); form.show(); a.exec(); }