Question: I am using DynamoDBMapper to insert a new object to my table.
Table structure:

```
key: hash_key
attribute1: global sec index
other attributes

```

Now i want the value of attribute1 to be unique in the table. How to do that?

Already tried:

```
a. map.put("attribute1", new ExpectedAttributeValue(false));
b. map.put("atrribute1", new ExpectedAttributeValue().withExists(false));

```

I am using `mapper.save()` with default SaveBehaviour.

Answer: 
You don't call class methods with a dot. You call class methods (not static) with `->` like:

```
$result = $mailer->SendMail();

```

Besides you need to set your properties with `$this->` (again if not static) change the content of your contstructor to:

```
$this->to = $to;
$this->subject = $subject;
$this->message = $message;

```

Same goes for your `mail()` function:

```
mail($this->to, $this->subject, $this->messagecontent)

```

You saw me mentioning static a few times, if you ever want to access a static property or method in your class you can use `self::`
`.` is a contact operator, to access member of a class both variable and functions use `->` operator
use the below code:  

`$result = $mailer->SendMail();`