小编Joh*_*nes的帖子

imap_body() 返回空字符串

各位开发者大家好,

我目前正在尝试使用 imap 阅读所有电子邮件。我试图使用 imap_headerinfo 获取标头信息,并使用 imap_fetchbody 获取正文。但是,我得到了所有 headerinfo,但只得到一个空字符串作为 fetchbody 函数的返回。我希望有一个人可以帮助我

$this->inbox = imap_open($server, $user, $password);

    // Header und Body der Email auslesen
    $emails = imap_search($this->inbox,'ALL');
    foreach($emails as $k) {
        $this->email_contents[$k] = array(
            'header' => imap_headerinfo($this->inbox, $k),
            'body' => imap_fetchbody($this->inbox, $k, '1')
        );
    }
    imap_close($this->inbox);
Run Code Online (Sandbox Code Playgroud)

获取结构

    object(stdClass)#65 (11) {
  ["type"]=>
  int(1)
  ["encoding"]=>
  int(0)
  ["ifsubtype"]=>
  int(1)
  ["subtype"]=>
  string(5) "MIXED"
  ["ifdescription"]=>
  int(0)
  ["ifid"]=>
  int(0)
  ["ifdisposition"]=>
  int(0)
  ["ifdparameters"]=>
  int(0)
  ["ifparameters"]=>
  int(1)
  ["parameters"]=>
  array(1) {
    [0]=>
    object(stdClass)#66 (2) {
      ["attribute"]=>
      string(8) "boundary"
      ["value"]=>
      string(36) …
Run Code Online (Sandbox Code Playgroud)

php email imap

1
推荐指数
1
解决办法
2489
查看次数

如何更改标记标签文字颜色?

我有一个问题,即使使用JavaScript中的labelColor属性,标签仍将保持黑色,但我想让它变成白色是否有任何方法可以这样做?也许是一种解决方法?

for (i = 0; i < locations.length; i++) {var myLatLng = new google.maps.LatLng(locations[i][1], locations[i][2]);
marker = new google.maps.Marker({
    position: myLatLng,
    map: map,
    label: labels[i],
    labelClass: "labels", // the CSS class for the label
    labelColor: '#fff',
    labelInBackground: false,
    icon: locations[i][4]
});
Run Code Online (Sandbox Code Playgroud)

问题是我有自己想要使用的自定义图标,我不想先创建一些SVG.感谢任何可以帮助我的人.

javascript label google-maps google-maps-api-3 google-maps-markers

0
推荐指数
1
解决办法
7938
查看次数