forlano Messages: 1213 Registered: March 2006 Location: Italy
Senior Contributor
nicomesas wrote on Mon, 16 October 2006 10:08
In order to be able to prove simply you must it open new package, to include package Web and to add the 2 files that there are in zip which I raised yesterday. In order to prove it, simply you must copy the following code.
I'm happy to announce to the U++ community that your experiment is a total success. In fact the following code:
#include <Core/Core.h>
#include <Web/Web.h>
#include <winsock.h>
bool sendMail(String to, String from)
{
SmtpMailEx mail ;
mail.Host("smtp.tele2.it")
.From( from )
.Subject("Jelou friend!")
.To( to )
.Text("ANY TEXT\nBYE")
// .User("xxxxxx") // I do not need autentication
// .Password("xxxxx")
;
if (mail.Send())
Cout() << "OK\r\n" ;
else
Cout() << "BAD\r\n" ;
Cout() << mail.GetError() << "\r\n" << mail.GetTranscript() << "\r\n" ;
}
CONSOLE_APP_MAIN
{
sendMail("forlano@fis.unical.it", "luigi.forlano@tin.it" ) ;
sendMail("luigi.forlano@tin.it" , "luigi.forlano@tin.it") ;
}
and your previous class smtpEx.cpp + smtpEx.h was able to send email! Just a note. The file Web.h need the inclusion of the line
#include "smtpEx.h"
Quote:
On the other hand, do not try to replace the original class, only I would like to see if it works in Windows to include the new functionalities in the original class.
I wish to see this fix in the official release of our lovely toolkit.