Question: I have this piece of code:

```
    ini_set('SMTP','smtp.strato.com');
$mail = new PHPmailer();
$mail->IsHTML(true);

```

It works fine but can I set smtp.strato.com somewhere in phpMailer class?

Answer: 
Have you looked at the smtp example in their site? [See here](http://phpmailer.worxware.com/index.php?pg=examplebsmtp)

Unless I'm miss understanding you, it looks to be very straight forward.

```
$mail             = new PHPMailer();

$body             = "message";

$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "mail.yourdomain.com"; // SMTP server
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->Host       = "mail.yourdomain.com"; // sets the SMTP server
$mail->Port       = 26;                    // set the SMTP port for the GMAIL server
$mail->Username   = "yourname@yourdomain"; // SMTP account username
$mail->Password   = "yourpassword";        // SMTP account password

$mail->SetFrom('name@yourdomain.com', 'First Last');
$mail->AddReplyTo("name@yourdomain.com","First Last");
$mail->Subject    = "PHPMailer Test Subject via smtp, basic with authentication";
$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->MsgHTML($body);

$mail->AddAddress("whoto@otherdomain.com", "John Doe");

if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}

```
You can by changing 

```
    $mail->IsSMTP(); 
    $mail->Host       = "mail.yourdomain.com"; 

```

to 

```
    $mail->IsSMTP(); 
    $mail->Host       = "smtp.strato.com"; 

```

You shouldnt modify the PHPMailer class