Originally posted by: Darko Juvan
I'm looking for SMTP AUTH class, which will authenticate user (RFC 2554). Is there any plans for adding this feature to this class or does anybody have any info, examples of SMTP using authentication.I'm willing to add authentication to this class, but I need some starting points. Any info is welcome.
ReplyOriginally posted by: Kim Andersen
There is a error in the decode function, there is no output to szOutput.
Here is a small fix.
int CBase64::Decode(LPCTSTR szDecoding, LPTSTR szOutput)
{
<.....>
// Clear the output buffer
memset( szOutput, 0, sInput.GetLength() + 1 );
m_nBitsRemaining = 0; // Little fix, Kim.
<.....>
}
Med venlig hilsen
Kim
Reply
Originally posted by: Chris DeFreitas
I continually received an "SMTP server error" until I traced through the code. At that point the message was sent correctly. I also checked the return codes from some of the socket funtions, but they were all ok.
The only thing that worked was adding Sleep( 250 ) before the call to m_wsSMTPServer.Receive() in the get_response() method.
The problem only occurs after the From line of the message is sent. So the solution slows down the entire email operation.
The error occurs after the call to m_wsSMTPServer.Receive(). response_buf does not begin with a three digit code (it begins with "eet you..."--no joke). The error occurs with the original code from Wes.Clyburn as well.
My machine has NT 4.0 service pack 5, with a PIII, 96kb RAM and a DSL connection.
Any help will be appreciated.
Chris.
Originally posted by:
Reply
Originally posted by: Anand
Hi,
In the base SMTP class ( by Wes clyburn ),When the statement
response_buf = new TCHAR[ RESPONSE_BUFFER_SIZE ]; is
encountered in the program, instead of allocating the required memory, it translates into a call to the function operator new. which is not the required one and makes the program a stand still.
Though he made a comment regarding this, Does any one encounterd this and made an update, please mail me.
TIA,
- Anand.
Originally posted by: Gunnar
Is there a samplesource to receive attached mails ?!?!?
It will be great if someone had some source =)
Kind regards
Gunnar
Originally posted by: Haishi
Thanks lot!
I tried the demo with my smtp mail server, it returned an error message: "503: server is not ready for data", could you please tell me what is the reason to cause this error message. how do I solve this probelm.
Originally posted by: Zhenzhe Wang
I thought there is a bug in CMIMETypeManger about the m_csAccess. In original code every time called
m_csAccess.Lock(), It do not call m_csAccess.UnLock() before returning. So when you create the CMIMEMessage
object in main thread, then send it in a new thread, it is blocked at function
CMIMEMessage::CMIMETypeManager::GetHandler(int nContentType).
I do not know why do not release the critical section after using it. I thought it is not a good habbit
if you are thinking about multi-thread.
The correction is simple, just call m_csAccess.Unlock() at every function that call m_csAccess.Lock()
before returning.
After all, I thought the class is wonderful, thank Wes Clyburn a lot.
Originally posted by: F. Andy Seidl
BOOL CMailMessage::GetRecipient(
Below is a replacement for the CMailMessage::GetRecipient()
method that fixes a problem with CC and BCC recipient lists.
The original version verified the nIndex value against the
size of the m_Recipient array, even when requesting CC or
BCC recipients.
CString& sEmailAddress,
CString& sFriendlyName,
int nIndex,
RECIPIENTS_TYPE type)
{
// +------------------------------------+
// | Select appropriate recipient list. |
// +------------------------------------+
CArray<CRecipient, CRecipient&>* paRecipients;
switch(type)
{
case TO: paRecipients = &m_Recipients; break;
case CC: paRecipients = &m_CCRecipients; break;
case BCC: paRecipients = &m_BCCRecipients; break;
default:
TRACE("Error: invalid type in CMailMessage::GetRecipient");
return FALSE;
}
// +-------------------------------------+
// | Verify index against selected list. |
// +-------------------------------------+
if (nIndex < 0 || nIndex > paRecipients->GetUpperBound())
{
TRACE("Warning: nIndex out of bounds in CMailMessage::GetRecipient()");
return FALSE;
}
// +----------------------------------------+
// | Extract requested recipient from list. |
// +----------------------------------------+
CRecipient& Recipient = paRecipients->GetAt(nIndex);
sEmailAddress = Recipient.m_sEmailAddress;
sFriendlyName = Recipient.m_sFriendlyName;
return TRUE;
}
Originally posted by: Bruno CHEVALIER
I have noticed that these classes doesn't work properly with some SMTP Servers. Some characters are altered. For example, the french character "�" becomes an "i". Does someone has an idea?
Hello, I also have some problems with this class ans so, i had a look at rfc's and found that french character set can not be send with this type of encoding. Have a look in http://www.usenet-fr.net/fur/comp/mail-lecture.html chapter 2.5 (in french), it explains that french character set can't be used with 7Bit encoding. I think I have to modify this class to be able to use 8Bit encoding. Have you find a solution to your problem ? Regards DD
Reply