KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   


- Content .- Fans (1) .- Knowledge Base  . 

Class for sending mail


Qt Component

Score 56%
Minimum required   Qt 4.x
Downloads:  2163
Submitted:  Apr 16 2011
Updated:  Apr 20 2011


This class may be used for sending mail via smtp-server with authorization and with ssl protection or no.
Class consists ofi two data-parts:
1. SmtpAuthData struct which used for smtp server authorizaton;
2. And other class data for Mail

Example for minimal succeed class work

SmtpAuthData smtpAuthData;
SmtpAuthData::Data data;
// your email address
data.email = "";
// login for your email account
data.login = "";
// password for auth on email account
data.password = "";

// set up smtp auth account data
Letter letter(smtpAuthData);

// mail to:
QString receivers = "";

// and than send letter

You may attach files to letter, put
absolutefilePath to QStringList and than call function with Letter object:
Letter::set_attachement(QStringList list)

Class support 5 different encodings:
utf-8, windows-1251, koi8-u, koi8-r and macintosh, set encoding very simple call function with Letter object:

Class support blind carbon copy(Bcc),
Letter::letter.set_blindCopyReceivers(QString bl_receivers)

Names in the fields may be in non ascii characters, it depends on coding which be setted with Letter::set_encoding("encoding") (windows-1251 default)

If smtp server doesn't support EHLO mode clas try to connect with HELO mode

Update: if you don't have installed openSSL libraries, there a brief instruction:
1. Open Win32 OpenSSL Installation Project page.
2. Download the latest "light" Win32 or Win64 installation package, for example "Win32 OpenSSL v0.9.8l Light".
3. Install it to any location. Ignore "Microsoft Visual C++ 2008 Redistributables" warning (click OK) and select copying OpenSSL DLLs to "The OpenSSL binaries (\bin) directory".
4. Copy libeay32.dll and ssleay32.dll from the \bin folder to the same place where your QtNetwork4.dll or QtNetworkd4.dll is located.

Send to a friend
Other  Apps  from bloodshadow
Report inappropriate content


 Nice program!

 by carpovpv on: Jun 16 2011
Score 50%

Thank you. Qt has only basic network capabilities and such a class is really useful.

Reply to this


 Re: Nice program!

 by bloodshadow on: Jun 17 2011
Score 50%

Thank you :)

Reply to this


 nice but

 by Raketten on: Jun 29 2011
Score 50%

This is just what I need, but I get Error during SSL handshake: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number as soon as I enable SSL in both windows and Fedora...

Trying to send mail to smtp.gmail.com


Reply to this


 Re: nice but

 by bloodshadow on: Jul 2 2011
Score 50%

Your SSL is OpenSSL ?
You need only OpenSSL

Reply to this


 Re: Re: nice but

 by Raketten on: Jul 3 2011
Score 50%

my mistake - I was tryng to send ssl encrypted mail to TLS port....gmail uses 465 for SSL...

Reply to this


 Nice but you can improve

 by stuk on: Mar 22 2012
Score 50%

Nice but you have to improve the Header of mail. The email date is not rfc2822 and you have to add MIME header for the type of the file you attach. For the date i fixed that if you want contact me.

Reply to this


 Re: Nice but you can improve

 by bloodshadow on: May 2 2012
Score 50%

Ok, later (1-2 weeks) I refactor code that was written (add TLS support)

Reply to this



 by anahit on: Jan 18 2013
Score 50%

Thank you very much. It was very useful.

Reply to this


 Could not be decoded

 by mohanakannan on: Jun 29 2013
Score 50%
Beacon Technosoft Solutions

It is showing that"It could not be decoded with Uft-8..And showing many errors..Could not be builded..Please help me

Reply to this

Add commentBack

 Who we are
More about us
Frequently Asked Questions
Updates on identi.ca
Updates on Twitter
Content RSS   
Events RSS   

Add App
Public API
About Qt-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Sponsor us
Report Abuse

Copyright 2006-2016 Qt-Apps.org Team  
All rights reserved. Qt-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
Qt is a trademarks of Nokia