Hi is it possible to specify a 'nickname' as the ATTENDEE in Vcalendar . so that instead of the email address appearing in the email 'required' field it would display a more friendly name ?
thanks for any help
Mick
Yes, easily via the CN parameter:
ATTENDEE;ROLE=REQ-PARTICIPANT;CN=Test User:MAILTO:test.user#somewhere.com
See also: http://www.kanzaki.com/docs/ical/attendee.html
Related
We have user with 3-4 shared email address in Outlook.
I am developing add-in where it will extract the email address of selected store and will get it's contact folder from People.
My problem is I don't know how to get email address of SelectedStore.
Here is my code.
string recipientName = SelectedStore.EmailAddress; // This is what I want to make it work
Outlook.Recipient recip = ns.CreateRecipient(recipientName);
recip.Resolve();
if (recip.Resolved)
{
Outlook.MAPIFolder folderContacts = ns.GetSharedDefaultFolder(recip, Outlook.OlDefaultFolders.olFolderContacts);
}
Any help will be appreciated.
Thank you.
For the mailbox owner, you can either try to read the MAPIFolder.Store property to get to the parent store, then read the PR_MAILBOX_OWNER_ENTRYID property (DASL name "http://schemas.microsoft.com/mapi/proptag/0x661B0102") using Store.PropertyAccessor.GetProperty. You can then use the store owner entry id to call Namespace.GetAddressEntryFromID. Once you have the AddressEntry object, you can use AddressEntry.GetExchangeUser.PrimarySmtpAddress.
Note that PR_MAILBOX_OWNER_ENTRYID property is only available in the online stores. You might want to use Redemption (I am its author) and its RDOExchangeMailboxStore.Owner.SmtpAddress property. RDOExchangeMailboxStore can be retrieved using RDOSession.GetRDOObjectfromOutlookObject(Store) or using RDOSession.GetStoreFromID.
You can also try to retrieve the store entry id and parse it - its format is documented and you can extract the EX type address of the owner. You can then construct the GAL entry id to open the AddressEntry object. From there, you can retrieve the SMTP address.
Just to let you know, I found the solution.
Outlook.MAPIFolder folderContacts = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts);
should do the trick.
I want to get current login user via EWS. I search some document, but I don’t find a method to get current user. I need your help. Thanks very much
Use ResolveName EWS operation - you will only need the user's SMTP address.
As Dmitry said, you could use ResolveName. For example:
NameResolutionCollection ncCol = service.ResolveName("user#domain.com",ResolveNameSearchLocation.DirectoryOnly,true);
Console.WriteLine(ncCol[0].Contact.DisplayName);
You could also use ConverId with a generic address to get the current user’s own email. For example:
Folder Inbox = Folder.Bind(service, WellKnownFolderName.Inbox);
AlternateId aiAlternateid = new AlternateId(IdFormat.EwsId, Inbox.Id.UniqueId, "mailbox#domain.com");
AlternateIdBase aiResponse = service.ConvertId(aiAlternateid, IdFormat.EwsId);
Console.WriteLine(((AlternateId)aiResponse).Mailbox);
AutoDiscover will also return the PrimarySMTP address of a Mailbox as you do a POX based discovery.
When a registered customer, for example "Armin van Buuren", places an order, he gets an email with "Hello Armin Buuren". That should be "Hello Armin van Buuren". Strange thing is when he would order something as a not registered user, so he don't make an account, the name in the e-mail is displayed correctly as "Hello Armin van Buuren".
In the order_new.html for registered users, the name is generated with:
Hello, {{htmlescape var=$order.getCustomerName()}}
In the order_new_guest.html for not registered customers, the name is generated with:
Hello, {{htmlescape var=$order.getBillingAddress().getName()}}
Already tried to use the guest html, but that doesn't displays the name correctly. It shows the name with the prefix, but that's not correct. It should be like "Hello, [NAME] [INSERT] [SURNAME]". Also searched on internet for this, but is seems that I am the only one with this problems?
If you know a possible solution, or what I should do or try, please let me know!
Thank you!
I edited the Magento settings to don't display the middle initial form, and then edited every customer to put the insert in the surname. I think that's the best option.
Thanks for the help guys!
I'd like to make email address optional during magento registration. I'm going to be adding an additional username attribute that users will be able to log in with (I've already got that part working). What are the steps to do this, or is it even possible? I found an old extension that does what I want I think, but it is out dated. http://www.magentocommerce.com/magento-connect/email-not-required.html
Thanks for any help.
You could do something similar to what the extension does.
"This extension will allow you to add customers without a valid email address. If no email address is present it will insert automatically an email address [customernumber]#[default customer domain]...."
You could create a gmail (or if you use google app for you company email) or a catch all email
Email Format
noemail+[timestamp]-[ipaddress to long]#gmail/yourdomain.com
Then remove the validation js from the email field that make it required in your .phtml.
Then create a custom module that override your checkout controller (assuming one page checkout)
/app/code/core/Mage/Checkout/controllers/OnepageController.php
/**
* save checkout billing address
*/
public function saveBillingAction()
{
...
if (isset($data['email']) && strlen($data['email']) > 3) {
$data['email'] = trim($data['email']);
}
else{
$data['email'] = getNoEmailGen(); // return noemail+[timestamp]-[ipaddress to long]...
}
(You could also do this using JS, where you pre generate the email address (in a hidden field or variable) and if email field is left blank you append/post it before submitting your billing form)
You shouldn't do that because when you order something, transactional mails are going to take place so you can't have users without mail. This should be weird.
I had a custom utility task that allowed users to choose an image to accompany the gift card notice that is sent to the recipient when a gift card is purchased at the magento run shop. In the template, there is an assortment of variables available so you can customize the email that is sent. However, in order to add the correct image, I need to have access to the gift card sku number since my method for handling this was to simply create many gift cards and apply separate images for each one, then use javascript to swap the sku numbers when the user clicks the images. Simple enough.
In the app/code/core/Enterprise/GiftCard/Model/Observer.php file, the variables are set:
$templateData = array(
'name' => $item->getProductOptionByCode('giftcard_recipient_name'),
'email' => $item->getProductOptionByCode('giftcard_recipient_email'),
'sender_name_with_email' => $sender,
'sender_name' => $senderName,
'gift_message' => $item->getProductOptionByCode('giftcard_message'),
'giftcards' => $codeList->toHtml(),
'balance' => $balance,
'is_multiple_codes' => 1 < $goodCodes,
'store' => $order->getStore(),
'store_name' => $order->getStore()->getName(), // #deprecated after 1.4.0.0-beta1
'is_redeemable' => $isRedeemable,
);
So I could add the product sku to this array and it would be available in the template system. Problem is, I don't know where to trace this back to even know how to get the Sku. I assume it is somehow available in the $item var, but magento has no documentation on this particular case and I can't guess since there is no method for testing. The email script is activated when the card is purchased so I can't just click a "Send test" button to see what comes out in the email that is sent to the user. The preview button dismisses variables.
Anyone happen to know about this? Possibly something like $item->getSku()
Any input helps.
Thanks
That snippet is from the method Enterprise_GiftCard_Model_Observer::generateGiftCardAccounts() which is registered as a handler for sales_order_save_after event. That event is passed the same 'order' object as the "new order placed" emails have. You can experiment by altering that email template and triggering a new email by resending from the order page in admin.
$item->getSku() is almost certainly right.