asdlei00 / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

Need to add "SMTP:" to the 'emailTo' address for (S)MAPI #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Send crash reports via SMAPI when on an Exchange Server (it seems)

What is the expected output? What do you see instead?
Expected: E-mail is sent
What is observed: Bouncing e-mails

What version of CrashRpt are you using?
1.3.0

What is your version of Visual Studio?
2010

What is your version of Windows operating system?
7

Please provide any additional information below.

We are seeing the following on our local network: when sending reports via 
SMAPI, the e-mails are always returned as 'undeliverable'. Google turned up 
this page 
http://www.codeproject.com/Articles/5260/XCrashReport-Exception-Handling-and-Cra
sh-Reportin?msg=1896304#xx1896304xx that led me to investigate a little bit. 
And doing the same in CrashRpt also solves the problem. I attach two 
screenshots; one was when SMAPI via Outlook/Exchange was used and the other via 
Thunderbird. Seems Thunderbird is clever enough to strip the extra 'SMTP:' away 
before sending; it however is just what Outlook/Exchange needs to function.

What I did:
In file ErrorReportSender.cpp line 1928, I replaced the following:

    m_MapiSender.SetTo(g_CrashInfo.m_sEmailTo);

with

    CString prefix_ = "SMTP:";
    m_MapiSender.SetTo(prefix_ + g_CrashInfo.m_sEmailTo);

Original issue reported on code.google.com by cron...@gmail.com on 14 Mar 2012 at 1:45

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot to mention, I know nothing about MAPI, so I don't know if the claim in 
the link above (about the format of the messages) is true.

Original comment by cron...@gmail.com on 14 Mar 2012 at 1:50

GoogleCodeExporter commented 9 years ago
From 
http://msdn.microsoft.com/en-us/library/windows/desktop/dd296720%28v=vs.85%29.as
px it seems it is correct:

"
lpszAddress 
Optional pointer to the recipient or sender's address; ...

The format of the address is address type:email address. Examples of valid 
addresses are FAX:206-555-1212 and SMTP:M@X.COM.
"

Original comment by cron...@gmail.com on 15 Mar 2012 at 7:11

GoogleCodeExporter commented 9 years ago

Original comment by zexspect...@gmail.com on 20 Mar 2012 at 5:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1349.

Original comment by zexspect...@gmail.com on 25 Aug 2012 at 4:26