mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:27:29 -05:00 
			
		
		
		
	Working on send with Microsoft
This commit is contained in:
		
							parent
							
								
									3f42bf9bff
								
							
						
					
					
						commit
						05e42a3f99
					
				@ -10,21 +10,24 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace App\Helpers\Mail;
 | 
					namespace App\Helpers\Mail;
 | 
				
			||||||
 | 
					 | 
				
			||||||
use Illuminate\Mail\Transport\Transport;
 | 
					 | 
				
			||||||
use Illuminate\Support\Str;
 | 
					use Illuminate\Support\Str;
 | 
				
			||||||
use Microsoft\Graph\Graph;
 | 
					use Microsoft\Graph\Graph;
 | 
				
			||||||
use Microsoft\Graph\Model\UploadSession;
 | 
					use Microsoft\Graph\Model\UploadSession;
 | 
				
			||||||
use Swift_Mime_SimpleMessage;
 | 
					use Swift_Mime_SimpleMessage;
 | 
				
			||||||
 | 
					use Symfony\Component\Mailer\Transport\AbstractTransport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Office365MailTransport extends Transport
 | 
					class Office365MailTransport extends AbstractTransport
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public function __construct()
 | 
					    public function __construct()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
 | 
					    public function doSend(SentMessage $message, &$failedRecipients = null)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $message = MessageConverter::toEmail($message->getOriginalMessage());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->beforeSendPerformed($message);
 | 
					        $this->beforeSendPerformed($message);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $graph = new Graph();
 | 
					        $graph = new Graph();
 | 
				
			||||||
@ -291,4 +294,10 @@ class Office365MailTransport extends Transport
 | 
				
			|||||||
            (array) $message->getReplyTo()
 | 
					            (array) $message->getReplyTo()
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     public function __toString(): string
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return 'office365';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user