search

Home  >  Q&A  >  body text

mail - How to combine Alibaba Cloud email push service with Laravel?

I have activated the Alibaba Cloud email push service and downloaded the API but I just don’t know how to use it. This is its API address: https://help.aliyun.com/docum...
I downloaded it and put it there Go to the root directory, then fill in the configuration and run it, and an error will be reported! ! !

我想大声告诉你我想大声告诉你2753 days ago779

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-05-16 16:53:18

    You can use the composer package I developed to send it.
    composer require rainwsy/aliyundm dev-stable
    https://github.com/rainwsy/al...
    How to use:

    use Rainwsy\Aliyunmail\Send\Single;
    use Rainwsy\Aliyunmail\Auth;
    $AccessKeyId = '';
    $AccessSecret = '';
    $auth = Auth::config($AccessKeyId, $AccessSecret);
    $mail = new Single();
    $mail->setAccountName('发件人地址');
    $mail->setFromAlias('发件人姓名');
    $mail->setReplyToAddress('true');
    $mail->setAddressType('1');
    $mail->setToAddress('收件人地址');
    
    $mail->setSubject('邮件主题');
    $mail->setHtmlBody('邮件正文');
    
    $send = $mail->send();
    
    print_r($send);

    reply
    0
  • Cancelreply