Closed Bug 221673 Opened 21 years ago Closed 16 years ago

SMTP: not removed from address if called via MAPI

Categories

(MailNews Core :: Simple MAPI, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mantovani.paolo, Assigned: Bienvenu)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Win98; it-IT; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1 Build Identifier: Mozilla/5.0 (Windows; U; Win98; it-IT; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1 When I create a new email using OpenOffice API's, a "SMTP:" appears before the address. Reproducible: Always Steps to Reproduce: 1. Set mozilla / thunderbird as default email program for Win98 2. Run OpenOffice.org 1.1 RC3 or later 3. Check the OOo configuration (Tools-->Options). You have to set the default email program on "System default email program" (not sure about the description, I'm using an Italian localized version) 4. Open the macro editor, add a new module (anywhere you want) and paste the following StarBASIC code (preferably in top of the module): REM ***** BASIC ***** Sub Test_Email_API oMailService = createUnoService("com.sun.star.system.SimpleSystemMail") If IsNull(oMailService) Then oMailService = _ createUnoService("com.sun.star.system.SimpleCommandMail") End If On Error GoTo ErrH oMailClient = oMailService.querySimpleMailClient() oMailMessage = oMailClient.createSimpleMailMessage() oMailMessage.Attachement = Array("file:///C:/MyDocuments/test.sxw") '*** oMailMessage.Subject = "ciao" oMailMessage.Recipient = "test@email.com" oMailClient.sendSimpleMailMessage( _ oMailMessage, com.sun.star.system.SimpleMailClientFlags.DEFAULTS) Exit Sub ErrH: MsgBox "Error opening email client.", 16 End Sub '*** THE FILE MUST EXIST (CREATE IT OR CHANGE THE URL TO MATCH AN EXISTING ONE) 5. Run the macro (press F5 or the appropriate button in the toolbar) Actual Results: A new email message appears, all works as expected BUT the address appears like this: "SMTP:test@email.com" Expected Results: The address should appears without the "SMTP:" prefix I initially labeled this behaviour as OpenOffice bug, but a Sun developer said to me that shoud be a bug in the mozilla implementation. Please, see my issue on OpenOffice.org issuezilla for additional informations http://www.openoffice.org/issues/show_bug.cgi?id=20746
confirmed using OOo 1.1 and Mozilla 20031008 on WinXP btw should "Attachement" be Attachment" ?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → Windows XP
Accroding to: http://msdn.microsoft.com/library/en-us/mapi/html/_mapi1book_mapirecipdesc_simple_mapi_.asp "The format of an address pointed to by the lpszAddress member is [address type][e-mail address]. Examples of valid addresses are FAX:206-555-1212 and SMTP:M@X.COM." perhaps we should just strip everything before the first ":"
Summary: Problems creating a new email using OpenOffice API's → SMTP: not removed from address if called via MAPI
This problem hampers interoperability with other mail clients (there's no easy way to find out if MAPI is going to redirect to Mozilla or not, and standard MAPI requires the SMTP: prefix). This affects the product we're developing for the dutch market. Happens with both Mozilla 1.4 and 1.5 (Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007).
This is a serious pain in the rear for me, as I write applications that have an "Automatically email unhandled exception reports" option. This means that I can no longer send the message in the background (i.e., without using the MAPI_DIALOG flag), because the TO: entries have to be manually edited in the dialog in order for the email to actually be sent to the proper addresses. Most other email clients handle this just fine, but I have to include another option ("Show send dialog") just to support Mozilla 1.4/1.5.
Since a few days, I am also affected by this bug (Mozilla 1.6, Win32) My Delphi-based application sends emails via MAPI interface. If Mozilla is used as default email client, sending fails. To make it work, I had to remove the SMTP:-Prefix from recepient address. But doing so stops every other MAPI-capable to send emails via MAPI :-( I vote for this bug because I don't want to code a workaround for Mozilla's bug into my application ;-) Achim
taking - didn't know about this problem
Assignee: cavin → bienvenu
I've also seen this SMTP:foo@bar.com issue. from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mapi/html/_mapi1book_mapirecipdesc_simple_mapi_.asp lpszName Pointer to the display name of the message recipient or sender. lpszAddress Optional pointer to the recipient or sender's address; this address is provider-specific message delivery data. Generally, the messaging system provides such addresses for inbound messages. For outbound messages, the lpszAddress member can point to an address entered by the user for a recipient not in an address book (that is, a custom recipient). The format of an address pointed to by the lpszAddress member is [address type][e-mail address]. Examples of valid addresses are FAX:206-555-1212 and SMTP:M@X.COM. I've seen someone call mapisend and set both lpszName and lpszAddress. in this particular case, lpszName is foo@bar.com and lpszAddress is smtp:foo@bar.com, but I'm not sure we can count on that.
You find the same problem if you use the palm desktop software and want to write a email to a contact of this programm. See Bug 243177 who describe this problem in detail. Maybe it's a duplicate of this bug.
*** Bug 243177 has been marked as a duplicate of this bug. ***
Attached patch proposed fixSplinter Review
Attachment #148325 - Flags: superreview?(sspitzer)
Attachment #148325 - Flags: superreview?(sspitzer) → superreview+
fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Blocks: 36836
Perhaps I am doing something wrong, but I am using the 5/25 build and still get this problem. "No recipient specified" when I try to synch with my Palm.
Product: MailNews → Core
*** Bug 273286 has been marked as a duplicate of this bug. ***
Reopening this bug based on comment 13, bug 273286 and bug 282720, all of which were reported after the patch for this bug went in. David, what do you think?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This bug is not evident in Mozilla Thunderbird. Peter
reporter writes "Perhaps I'll be able to do some test in the next days, when I'll have access to a Windows machine with a proper ooo+thunderbird setup."
QA Contact: stephend → simple-mapi
Whiteboard: closeme 2008-09-01
Product: Core → MailNews Core
RESO INCO due to lack of response to last comment. If you feel this change was made in error, please respond to this bug with your reasons why.
Status: REOPENED → RESOLVED
Closed: 21 years ago16 years ago
Resolution: --- → INCOMPLETE
Paolo, please comment in the bug. I should have used [waiting on reporter] instead of closeme
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Whiteboard: closeme 2008-09-01 → [waiting on reporter]
Sorry for the delay but I have been very busy in my real life. I have just tested the StarBasic code on top of this IZ in the following context: OS: Microsoft Windows XP Professional Version: 5.1.2600 Service Pack 2 Build 2600 Email client: Mozilla Thunderbird Version: 2.0.0.5 (20070716) Localization: it Openoffice.org v 2.2 The result now is that a new email message is created from TB, and the email address in the recipient is correctly displayed, without any "SMPT:" prefix, so all works correctly for me.
=> WFM per reporter and myself Thanks Paolo
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → WORKSFORME
Whiteboard: [waiting on reporter]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: