C# 为什么不';我不能从eBay API获得电子邮件通知吗?

C# 为什么不';我不能从eBay API获得电子邮件通知吗?,c#,.net,email,ebay-api,C#,.net,Email,Ebay Api,当我的一件物品卖出时,我正试图收到一封电子邮件。然而,没有电子邮件来过。如果我将其更改为在列出某个项目时通知我,则该电子邮件会到达,这样我就知道我的代码在某种程度上正常工作。这是我的密码: ApiContext apiContext= GetApiContext(); SetNotificationPreferencesCall apiCall = new SetNotificationPreferencesCall(apiContext); ApplicationDeliveryPr

当我的一件物品卖出时,我正试图收到一封电子邮件。然而,没有电子邮件来过。如果我将其更改为在列出某个项目时通知我,则该电子邮件会到达,这样我就知道我的代码在某种程度上正常工作。这是我的密码:

    ApiContext apiContext= GetApiContext();

SetNotificationPreferencesCall apiCall = new SetNotificationPreferencesCall(apiContext);
ApplicationDeliveryPreferencesType applicationDeliveryPreferences = new ApplicationDeliveryPreferencesType();
applicationDeliveryPreferences.ApplicationEnable = EnableCodeType.Enable;
applicationDeliveryPreferences.ApplicationEnableSpecified = true;
applicationDeliveryPreferences.ApplicationURL = "mailto://myemail@gmail.com";
applicationDeliveryPreferences.AlertEmail = "mailto://myemail@gmail.com";
applicationDeliveryPreferences.AlertEnable = EnableCodeType.Enable;
applicationDeliveryPreferences.AlertEnableSpecified = true;

NotificationEnableType notification =
new NotificationEnableType
{
EventEnable = EnableCodeType.Enable,
EventEnableSpecified = true,
EventType = NotificationEventTypeCodeType.ItemSold,
EventTypeSpecified = true
};


apiCall.UserDeliveryPreferenceList = new NotificationEnableTypeCollection(new[] { notification });
apiCall.ApplicationDeliveryPreferences = applicationDeliveryPreferences;
apiCall.UserDeliveryPreferenceList = new NotificationEnableTypeCollection(new[] { notification });
apiCall.Execute();

可能在垃圾邮件文件夹中,可能被gmail过滤并被自动删除。