最近很多小伙伴都在问WordpressMailpoet3在Outlook中不显示图像和outlook没有pop这两个问题,那么本篇文章就来给大家详细解答一下,同时本文还将给你拓展(4096,'Micr
最近很多小伙伴都在问Wordpress Mailpoet 3 在 Outlook 中不显示图像和outlook没有pop这两个问题,那么本篇文章就来给大家详细解答一下,同时本文还将给你拓展(4096, 'Microsoft Outlook', '尝试操作失败找不到对象', None, 0, -2147221233), None) - Outlook 错误、 边框在 Outlook 桌面版中不起作用,但在 Outlook Live 和 Gmail 中有效、Applescript:Outlook 2019:为带有历史记录的 Outlook 电子邮件中的最后一条消息设置变量、C# Outlook:无法将“System._ComObject”类型的 COM 对象转换为接口类型“Microsoft.Office.Interop.Outlook.MailItem.”等相关知识,下面开始了哦!
本文目录一览:- Wordpress Mailpoet 3 在 Outlook 中不显示图像(outlook没有pop)
- (4096, 'Microsoft Outlook', '尝试操作失败找不到对象', None, 0, -2147221233), None) - Outlook 错误
- 边框在 Outlook 桌面版中不起作用,但在 Outlook Live 和 Gmail 中有效
- Applescript:Outlook 2019:为带有历史记录的 Outlook 电子邮件中的最后一条消息设置变量
- C# Outlook:无法将“System._ComObject”类型的 COM 对象转换为接口类型“Microsoft.Office.Interop.Outlook.MailItem.”
Wordpress Mailpoet 3 在 Outlook 中不显示图像(outlook没有pop)
如何解决Wordpress Mailpoet 3 在 Outlook 中不显示图像
我在我的 wordpress 网站中使用 Mailpoet 插件来发送和管理电子邮件和时事通讯。 我已向某些地址发送了几封电子邮件以执行测试,但我发现 Outlook 未在我的电子邮件中显示图像。
事情是这样的:
- 例如,gmail 可以完美地显示图像
- outlook 在手机应用程序中显示图像正常(在 android Outlook 应用程序上测试)
- 但是,outlook/hotmail 不会在任何浏览器中显示图像(我尝试过 chrome、opera gx、firefox 和 edge)
- 我什至没有得到允许图像的典型黄旗。它们只是没有在浏览器中加载。
所以问题似乎只出现在 Web 浏览器 Outlook 中(无论如何,由于使用它的人太多,所以问题很大)。
我的 htaccess 盗链代码如下:
# Prevent image hotlinking in wordpress
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?mywebsite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?bing.es [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?instagram.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?twitter.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?outlook.live.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\\.)?yahoo.es [NC]
RewriteRule \\.(jpg|jpeg|png|gif|pdf)$ - [F]
我相信代码没问题,应该不是问题。 Outlook android 应用程序也显示图像,所以...
我能得到一些帮助吗?
谢谢。 最好的问候。
(4096, 'Microsoft Outlook', '尝试操作失败找不到对象', None, 0, -2147221233), None) - Outlook 错误
如何解决(4096, ''Microsoft Outlook'', ''尝试操作失败找不到对象'', None, 0, -2147221233), None) - Outlook 错误
我目前正在使用 pywin32.com python 库将邮件移动到 Outlook 中的特定文件夹。 我必须使文件夹路径可配置,因此我创建了一个 python 文件,我将文件夹路径保留为列表。 FoldersConfig.py 文件的内容是:
#folder 名称相对于收件箱文件夹
mailBox = "mailBox-name"
nagiosDestinationFolder = ["Resolved_Clients","Internal","Nagios alerts"] #all these folders are been created in outlook with exact names.
然后还有另一个文件可以将邮件移动到目标文件夹。就我而言,Nagios alerts 是我的目标文件夹。 MoveNagiosAlerts.py 文件的代码片段是:
outlook = client.dispatch("outlook.application").GetNamespace("MAPI")
stores = outlook.Stores
for store in stores:
mailBox = FoldersConfig.mailBox
if(mailBox in store.displayName):
rootFolder = store.GetDefaultFolder(6) #rootFolder is the InBox folder
break
def moveWarnings():
print("Moving warning mails...")
warnCount = 0
scriptingDictionary = {}
nagiosDestFolder = rootFolder
for i in FoldersConfig.nagiosDestinationFolder:
nagiosDestFolder = nagiosDestFolder.Folders(i)
print(nagiosDestFolder)
for i in range(rootFolder.Items.Count-1,-1):
msg = rootFolder.Items[i]
if(msg.Body.find("State: WARNING") != -1):
msg.Move(nagiosDestFolder)
warnCount+=1
return warnCount
运行MoveNagiosAlerts.py文件时弹出的错误是:
Root folder(InBox): InBox
Moving warning mails..
Traceback (most recent call last):
File "C:\\Users\\Documents\\MoveNagiosAlerts.py",line 193,in <module>
main()
File "C:\\Users\\Documents\\MoveNagiosAlerts.py",line 172,in main
warningsCount = moveWarnings()
File "C:\\Users\\Documents\\MoveNagiosAlerts.py",line 56,in moveWarnings
nagiosDestFolder = nagiosDestFolder.Folders(i)
File "C:\\Users\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\python37\\site-packages\\win32com\\client\\dynamic.py",line 181,in __call__
return self._get_good_object_(self._oleobj_.Invoke(*allArgs),self._olerepr_.defaultdispatchName,None)
pywintypes.com_error: (-2147352567,''Exception occurred.'',(4096,''Microsoft Outlook'',''The attempted operation Failed. An object Could not be found.'',None,-2147221233),None)
Outlook folder structure for your refrence
我的问题是为什么会抛出这个错误??它有时工作正常,但大多数情况下会抛出此错误。知道我的代码有什么问题吗?还是前景的问题?
根据我的理解,我认为 pywin 客户端无法获取列表中的文件夹。但不确定是否是这个原因。
解决方法
我注意到代码中有以下循环:
for i in range(rootFolder.Items.Count-1,-1):
msg = rootFolder.Items[i]
移动项目时,集合中的项目数量会减少。因此,您需要为此做好准备。
此外,如果您只想移动符合条件的项目,您需要使用 Find
/FindNext
或 Restrict
方法来获取此类项目,并且它们无需移动所有项目检查任何其他属性。在以下文章中详细了解这些方法:
- How To: Use Find and FindNext methods to retrieve Outlook mail items from a folder (C#,VB.NET)
- How To: Use Restrict method to retrieve Outlook mail items from a folder
边框在 Outlook 桌面版中不起作用,但在 Outlook Live 和 Gmail 中有效
如何解决<span> 边框在 Outlook 桌面版中不起作用,但在 Outlook Live 和 Gmail 中有效
第一个 span,边框为 1px solid #333;未在 Outlook 365 中显示,但在 Outlook Live 和 Gmail 中显示。我已经尝试过轮廓和框阴影,它也没有任何作用。第一个带边框 1px 实心的跨度 #333;未在 Outlook 365 中显示,但在 Outlook Live 和 Gmail 中显示。我也尝试过轮廓和框阴影,但它没有任何作用。I
<table cellpadding="0" cellspacing="0" width="100%" role="presentation" style=" mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse; border-spacing: 0px; ">
<tr>
<td align="right" style="padding: 0; margin: 0">
<span class="es-button-border" bordercolor="#333" border="1" style=" mso-border-right-alt: 1px solid #333333; mso-border-bottom-alt: 1px solid #333333; mso-border-left-alt: 1px solid #333333; mso-border-top-alt: 1px solid #333333; border-style: solid; border-color: #333333; border-width: 1px; border: 1px solid #333333; display: inline-block; border-radius: 0px; width: auto; ">
<span class="es-button" target="_blank" style=" mso-style-priority: 100 !important; text-decoration: none; -webkit-text-size-adjust: none; -ms-text-size-adjust: none; mso-line-height-rule: exactly; color: #333333; font-size: 12px; border-style: solid; border-color: #fff; border-width: 10px 20px 10px 20px; display: inline-block; background: #fff; border-radius: 0px; font-family: roboto,''helvetica neue'',helvetica,arial,sans-serif; font-weight: normal; font-style: normal; line-height: 14px; width: auto; text-align: center; " >
<span id="price1">Per person:</span>
INR 98298 (CHF 1192)
</span>
</span>
</td>
</tr>
</table>
解决方法
问题是您将跨度用作块元素,这不是自然而然的,而且最重要的是 - 试图通过使用 display:inline-block 来强制它在 Outlook 客户端中并不总是有效.
最好的办法是使用块级元素作为边框。其中包括:表格单元格和 div。 您可以将所有 span 标签转换为 div 以使其工作,但是由于 div 是块元素,默认情况下它们将变为全宽。 您可以定义宽度来解决这个问题,但是 Outlook 不会尊重那些没有特定于 mso 代码的宽度。
下面是你的代码,下面是我要做的行:
<table cellpadding="0" cellspacing="0" width="100%" role="presentation" style=" mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse;">
<tr>
<td align="right">
<span class="es-button-border" style="border: 1px solid #333333; display: inline-block;">
<span class="es-button" style="mso-style-priority: 100 !important; text-decoration: none; -webkit-text-size-adjust: none; -ms-text-size-adjust: none; mso-line-height-rule: exactly; color: #333333; font-size: 12px; border-style: solid; border-color: #fff; border-width: 10px 20px 10px 20px; display: inline-block; background: #fff; border-radius: 0px; font-family: roboto,''helvetica neue'',helvetica,arial,sans-serif; font-weight: normal; font-style: normal; line-height: 14px; width: auto; text-align: center;">
<span id="price1">Per person:</span>INR 98298 (CHF 1192)
</span>
</span>
</td>
</tr>
<tr>
<td style="padding-top:10px;">
<table align="right" role="presentation" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #333333;">
<tr>
<td class="es-button-border" style="text-decoration: none; -webkit-text-size-adjust: none; -ms-text-size-adjust: none; mso-line-height-rule: exactly; color: #333333; font-family: roboto,sans-serif; font-size: 12px; line-height: 14px; text-align: center;">
<div style="border-style: solid; border-color: #fff; border-width: 10px 20px 10px 20px;">
<span id="price1">Per person:</span>INR 98298 (CHF 1192)
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>