mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 03:40:09 -05:00 
			
		
		
		
	Fixes for sending from email name
This commit is contained in:
		
							parent
							
								
									ea319858e7
								
							
						
					
					
						commit
						23ebe8d6e9
					
				@ -127,7 +127,15 @@ class EmailDefaults
 | 
				
			|||||||
    private function setFrom(): self
 | 
					    private function setFrom(): self
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (Ninja::isHosted() && $this->email->email_object->settings->email_sending_method == 'default') {
 | 
					        if (Ninja::isHosted() && $this->email->email_object->settings->email_sending_method == 'default') {
 | 
				
			||||||
            $this->email->email_object->from = new Address(config('mail.from.address'), $this->email->company->owner()->name());
 | 
					
 | 
				
			||||||
 | 
					            if ($this->email->company->account->isPaid() && property_exists($this->email->email_object->settings, 'email_from_name') && strlen($this->email->email_object->settings->email_from_name) > 1) {
 | 
				
			||||||
 | 
					                $email_from_name = $this->email->email_object->settings->email_from_name;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                $email_from_name = $this->email->company->present()->name();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            $this->email->email_object->from = new Address(config('mail.from.address'), $email_from_name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return $this;
 | 
					            return $this;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user