2

what is the problem in $organizer variable I don't know what is going on with this variable

case 1: $organizer = "CN=Organizer name:email@YourOrganizer.com";

whatsappstatus0001@gmail is the email address which is used to send emails from website.Suppose I am the person who want to fill the form( ex: robopathshala@gmail.com) and whatsappstatus0001@gmail email address will send the information details of robopathshala to the sales person email address( ex: alokm014@gmail.com).

sales person getting an invitation mail. Please check screenshot case 1 case 1

that is fine but why sales person getting email delivery fail notification.

case 2: case 1: $organizer = "CN=Organizer Sales:alokm014@gmail.com"; 

Now, sales person getting an invitation mail but yes no button is not there. Please check in screenshot case 2

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;

class NewContactRequest extends Mailable
{
    use Queueable, SerializesModels;

    public $data;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($data)
    {
        $this->data = $data;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        $hour = 0;

        if(($this->data['what'])=="PM"){
            $hour = $this->data['hour'] + 12;
        }
        else{
           $hour = $this->data['hour']; 
        }

        $filename = "invite.ics";
        $meeting_duration = (3600 * 2); // 2 hours

        $meetingstamp = strtotime($this->data['date'].'T'.$hour.$this->data['min'] . "UTC");

        $dtstart = gmdate('Ymd\THis\Z', $meetingstamp- 19800);

        $dtend =  gmdate('Ymd\THis\Z', $meetingstamp- 19800 + $meeting_duration);
        $todaystamp = gmdate('Ymd\THis\Z');

        $uid = date('Ymd').'T'.date('His').'-'.rand().'@yourdomain.com';

        $description = ("Full Name:".$this->data['name'].", Mobile no:".$this->data['phone'].", Company Name:".$this->data['company']);
        $location = "Delhi";
        $titulo_invite = "Schedule A Demo";
        $organizer = "CN=Organizer name:email@YourOrganizer.com";

        // ICS
        $mail[0]  = "BEGIN:VCALENDAR";
        $mail[1] = "PRODID:-//Google Inc//Google Calendar 70.9054//EN";
        $mail[2] = "VERSION:2.0";
        $mail[3] = "CALSCALE:GREGORIAN";
        $mail[4] = "METHOD:REQUEST";
        $mail[5] = "BEGIN:VEVENT";
        $mail[6] = "DTSTART;TZID=India:" . $dtstart;
        $mail[7] = "DTEND;TZID=India:" . $dtend;
        $mail[8] = "DTSTAMP;TZID=India:" . $todaystamp;
        $mail[9] = "UID:" . $uid;
        $mail[10] = "ORGANIZER;" . $organizer;
        $mail[11] = "CREATED:" . $todaystamp;
        $mail[12] = "DESCRIPTION:" . $description;
        $mail[13] = "LAST-MODIFIED:" . $todaystamp;
        $mail[14] = "LOCATION:" . $location;
        $mail[15] = "SEQUENCE:0";
        $mail[16] = "STATUS:CONFIRMED";
        $mail[17] = "SUMMARY:" . $titulo_invite;
        $mail[18] = "TRANSP:OPAQUE";
        $mail[19] = "END:VEVENT";
        $mail[20] = "END:VCALENDAR";

        $mail = implode("\r\n", $mail);
        header("text/calendar");
        file_put_contents($filename, $mail);


        return $this->from('whatsappstatus0001@gmail.com')
            ->subject('Schedule A Demo')
            ->attach($filename, array('mime' => "text/calendar"))
            ->view('email')->with('data', $this->data);

    }
}

please help me. I am not able to understand the flow.

0 Answers0