At the start of episode 1x13 Spencer overhears the newlyweds Melissa and Ian downstairs whispering. It is really hard to to hear but the conversation is something like this:
I = We can’t just tell them
M = We have to
I = We just have to keep quiet…It will all be wonderful I promise
M = I just think..
I = No Melissa no one has to know, if they find out the truth they are going to question us about things we can’t answer.
M = I know, your right
I = You just have to remember, we’re in this together
Then Spencer runs back to her room and gets the email saying:
Hinting that Ian and Melissa would cover for each other. (back in Season one we thought Melissa was covering for Ian not the other way around)
If Ian knew what Melissa did he could testify against her, but if they were married he would not have to testify against her (spousal privilege)
So I think that Melissa told Ian her secret. This would explain what Ian meant when he tried to kill Spencer and make it look like a suicide by pre-planting a suicide note on Spencer’s computer with Spencer confessing to killing Alison. he said he was doing it because he loved Melissa. If Spencer went down for Killing Alison then Melissa would always be safe.
Funnily enough that is what happened when Ian died. Someone made it look like a suicide, leaving a note in which he confessed to Alison’s murder.