Using SMTP for iOS App



  • Hello,
    I'm totaly new with programming and Qt. I've wrote an Desktop Application, which sends an designed email, where you can input some text. Now I'm interessted in porting it for iOS but I have a problem with the QSslSocket, which is not defined for iOS, because of missing OpenSSL.
    I've tried to Compile a Qt version from source with OpenSSL for iOS but the building doesn't worked (Error: No rule to make target .../libQt5Svg.a', needed by.../libsvgicon.a'. Stop.)
    Also I've tried to enable the QSslSocket for iOS but this also didn't work.

    So, this is my 5th oder 6th program, and im totaly lost. I would be very happy if someone has a idea for sending a designed email from iOS.

    Thank you!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    For the OpenSSL part, did you first cross-compile OpenSSL for iOS before building Qt ?

    As for the email sending, you could use the Mail application



  • Thank you for reply!

    Yes, if tried to cross-compile OpenSSL with "this":https://github.com/x2on/OpenSSL-for-iPhone/tree/master/OpenSSL-for-iOS repository an than I've tried to configure the Makefile with the following script:
    @B="/Users/pinkfrog/Qt/5.3/Src"
    export OPENSSL_LIB="-L${B}/OpenSSL-for-iPhone/lib -I${B}/OpenSSL-for-iPhone/includes -lssl -lcrypto"

    ./configure -openssl -openssl-linked -no-c++11 -release -opensource -nomake examples -nomake tests -xplatform macx-ios-clang -confirm-license -platform macx-clang -continue -plugin-sql-mysql -plugin-sql-odbc -prefix /Users/pinkfrog/Qt/5.3/iphone@

    I will test using the mail api for iOS, but the point I like from my app is, that i only need one click to send the email... and I think, there will be some more clicks if I use the normal email app at iphone.


  • Lifetime Qt Champion

    That projects looks more like a wrapper around OpenSSL. You need to build OpenSSL itself. There's "this":https://github.com/st3fan/ios-openssl project that might help


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.